Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Sara-N NBIoT platform. #2705

Closed
wants to merge 6 commits into from
Closed

Introduce Sara-N NBIoT platform. #2705

wants to merge 6 commits into from

Conversation

RobMeades
Copy link
Contributor

@RobMeades RobMeades commented Sep 14, 2016

Notes:

Re-integrated on a completely fresh pull and only one step ahead of HEAD. Nothing can fail this time due to a merge problem.

Description

  • The u-blox Sara-N platform now passes all of the available tests (according to mbed test -c) for its small memory configuration (aside from a C library nano.spec float non-compliance which I have no control over, the new race_test, which is a multi-threaded test and hence not applicable to the small memory configuration, and an issue with the lp sleep tests, which I'm looking at but don't want to gate this submission). Hence I would like to introduce it into the main mbed stream so that it doesn't fall behind in future developments.
  • The platform HW is not yet available in a form where the magic chip is included, hence two hook files for htrun have been included to allow code loading and target reset with a Segger J-Link box. If this pull request is accepted, I will submit those hook files to the htrun repository also.

Status

IN DEVELOPMENT

Migrations

None.

Related PRs

None.

Todos

  • Resolve issue with lp sleep tests.
  • Add drivers for more peripherals (ASYNC, SPI, I2C, PWM, ADC).

Deploy notes

This release not for general use, simply to join the workflow.

Steps to test or reproduce

In order to run the htrun tests you will need access to some tools that are stored in a private repo. The current test status is as follows:

|     | Image                             | Test                                                   | Runs   | Skip?   | Passes   | Fails   | Bad Exit?   |
|-----+-----------------------------------+--------------------------------------------------------+--------+---------+----------+---------+-------------|
| 1   | basic_test                        | Simple Test                                            | 1      |         | 1        | 0       |             |
| 2   | basic_test                        | Repeating Test                                         | 2      |         | 3        | 0       |             |
| 3   | basic_test_default                | Simple Test                                            | 1      |         | 1        | 0       |             |
| 4   | basic_test_default                | Repeating Test                                         | 2      |         | 3        | 0       |             |
| 5   | case_async_validate               | Validate: Simple Validation                            | 1      |         | 1        | 0       |             |
| 6   | case_async_validate               | Validate: Multiple Validation                          | 1      |         | 1        | 0       |             |
| 7   | case_async_validate               | Validate: Premature Validation                         | 1      |         | 1        | 0       |             |
| 8   | case_async_validate               | Validate: Multiple Premature Validation                | 1      |         | 1        | 0       |             |
| 9   | case_async_validate               | Validate: Attributed Validation: Cancel Repeat         | 1      |         | 1        | 0       |             |
| 10  | case_async_validate               | Validate: Attributed Validation: Enable Repeat Handler | 1      |         | 1        | 0       |             |
| 11  | case_control_async                | Control: Timeout (Failure)                             | 1      |         | 1        | 0       |             |
| 12  | case_control_async                | Control: Timeout (Success)                             | 1      |         | 1        | 0       |             |
| 13  | case_control_async                | Control: Await                                         | 1      |         | 1        | 0       |             |
| 14  | case_control_async                | Control: RepeatAllOnTimeout                            | 10     |         | 1        | 0       |             |
| 15  | case_control_async                | Control: RepeatHandlerOnTimeout                        | 1      |         | 1        | 0       |             |
| 16  | case_control_async                | Control: NoTimeout                                     | 1      |         | 1        | 0       |             |
| 17  | case_control_async                | Control: CaseNext                                      | 1      |         | 1        | 0       |             |
| 18  | case_control_repeat               | Control: RepeatAll                                     | 10     |         | 55       | 0       |             |
| 19  | case_control_repeat               | Control: RepeatHandler                                 | 1      |         | 10       | 0       |             |
| 20  | case_control_repeat               | Control: NoRepeat                                      | 1      |         | 1        | 0       |             |
| 21  | case_control_repeat               | Control: CaseNext                                      | 1      |         | 1        | 0       |             |
| 22  | case_selection                    | Case 1                                                 | 1      |         | 1        | 0       |             |
| 23  | case_selection                    | Case 2                                                 | 1      |         | 1        | 0       |             |
| 24  | case_selection                    | Case 3                                                 | 1      |         | 1        | 0       |             |
| 25  | case_setup_failure                | Setup handler returns ABORT                            | 1      |         | 1        | 0       |             |
| 26  | case_setup_failure                | Setup handler returns IGNORE                           | 1      |         | 1        | 0       |             |
| 27  | case_setup_failure                | Setup handler returns CONTINUE                         | 1      |         | 1        | 0       |             |
| 28  | case_teardown_failure             | Teardown handler returns CONTINUE                      | 1      |         | 1        | 0       |             |
| 29  | case_teardown_failure             | Teardown handler returns ABORT but is IGNORED          | 1      |         | 1        | 0       |             |
| 30  | case_teardown_failure             | Teardown handler returns ABORT                         | 1      |         | 1        | 0       |             |
| 31  | control_type                      | Testing constructors                                   | 1      |         | 1        | 0       |             |
| 32  | control_type                      | Testing constants                                      | 1      |         | 1        | 0       |             |
| 33  | control_type                      | Testing combinations of same group                     | 1      |         | 1        | 0       |             |
| 34  | control_type                      | Testing combinations of different group                | 1      |         | 1        | 0       |             |
| 35  | minimal_async_scheduler           | Minimal Scheduler: Case 1                              | 1      |         | 1        | 0       |             |
| 36  | minimal_async_scheduler           | Minimal Scheduler: Case 2                              | 1      |         | 1        | 0       |             |
| 37  | minimal_async_scheduler           | Minimal Scheduler: Case 3                              | 1      |         | 1        | 0       |             |
| 38  | minimal_async_scheduler           | Minimal Scheduler: Async Case 4 (Failure)              | 1      |         | 1        | 0       |             |
| 39  | minimal_scheduler                 | Minimal Scheduler: Case 1                              | 1      |         | 1        | 0       |             |
| 40  | minimal_scheduler                 | Minimal Scheduler: Case 2                              | 1      |         | 1        | 0       |             |
| 41  | minimal_scheduler                 | Minimal Scheduler: Case 3                              | 1      |         | 1        | 0       |             |
| 42  | minimal_scheduler                 | Minimal Scheduler: Case 4                              | 1      |         | 1        | 0       |             |
| 43  | minimal_scheduler                 | Minimal Scheduler: Case 5                              | 1      |         | 1        | 0       |             |
| 44  | minimal_scheduler                 | Minimal Scheduler: Case 6                              | 1      |         | 1        | 0       |             |
| 45  | minimal_scheduler                 | Minimal Scheduler: Case 7                              | 1      |         | 1        | 0       |             |
| 46  | minimal_scheduler                 | Minimal Scheduler: Case 8                              | 1      |         | 1        | 0       |             |
| --  | test_assertion_failure_test_setup |                                                        |        |         |          |         |             |
| --  | test_setup_case_selection_failure |                                                        |        |         |          |         |             |
| --  | test_setup_failure                |                                                        |        |         |          |         |             |
| --  | heap_and_stack                    |                                                        |        |         |          |         |             |
| --  | basic                             |                                                        |        |         |          |         |             |
| 47  | attributes                        | Testing PACKED attribute                               | 1      |         | 1        | 0       |             |
| 48  | attributes                        | Testing ALIGN attribute                                | 1      |         | 1        | 0       |             |
| 49  | attributes                        | Testing UNUSED attribute                               | 1      |         | 1        | 0       |             |
| 50  | attributes                        | Testing WEAK attribute                                 | 1      |         | 1        | 0       |             |
| 51  | attributes                        | Testing PURE attribute                                 | 1      |         | 1        | 0       |             |
| 52  | attributes                        | Testing FORCEINLINE attribute                          | 1      |         | 1        | 0       |             |
| 53  | attributes                        | Testing NORETURN attribute                             | 1      |         | 1        | 0       |             |
| 54  | attributes                        | Testing UNREACHABLE attribute                          | 1      |         | 1        | 0       |             |
| 55  | attributes                        | Testing DEPRECATED attribute                           | 1      |         | 1        | 0       |             |
| --  | call_before_main                  |                                                        |        |         |          |         |             |
| --  | cpp                               |                                                        |        |         |          |         |             |
| --  | div                               |                                                        |        |         |          |         |             |
| 56  | c_strings                         | C strings: strtok                                      | 1      |         | 1        | 0       |             |
| 57  | c_strings                         | C strings: strpbrk                                     | 1      |         | 1        | 0       |             |
| 58  | c_strings                         | C strings: %i %d integer formatting                    | 1      |         | 1        | 0       |             |
| 59  | c_strings                         | C strings: %u %d integer formatting                    | 1      |         | 1        | 0       |             |
| 60  | c_strings                         | C strings: %x %E integer formatting                    | 1      |         | 1        | 0       |             |
| 60  | c_strings                         | C strings: %f %f float formatting                      | 0      | x       | 0        | 0       |             |
| 61  | c_strings                         | C strings: %e %E float formatting                      | 1      |         | 1        | 0       |             |
| 62  | c_strings                         | C strings: %g %g float formatting                      | 1      |         | 1        | 0       |             |
| --  | dev_null                          |                                                        |        |         |          |         |             |
| 63  | echo                              | Echo server: x16                                       | 1      |         | 1        | 0       |             |
| 64  | echo                              | Echo server: x32                                       | 1      |         | 1        | 0       |             |
| 65  | echo                              | Echo server: x64                                       | 1      |         | 1        | 0       |             |
| 66  | generic_tests                     | Basic                                                  | 1      |         | 1        | 0       |             |
| 67  | generic_tests                     | Blinky                                                 | 1      |         | 1        | 0       |             |
| 68  | generic_tests                     | C++ stack                                              | 1      |         | 1        | 0       |             |
| 69  | generic_tests                     | C++ heap                                               | 1      |         | 1        | 0       |             |
| 70  | lp_timeout                        | 500us LowPowerTimeout                                  | 1      |         | 1        | 0       |             |
| 71  | lp_timeout                        | 1ms LowPowerTimeout                                    | 1      |         | 1        | 0       |             |
| 72  | lp_timeout                        | 1sec LowPowerTimeout                                   | 1      |         | 1        | 0       |             |
| 73  | lp_timeout                        | 5sec LowPowerTimeout                                   | 1      |         | 1        | 0       |             |
| 74  | lp_timeout                        | 1sec LowPowerTimeout from sleep                        | 0      |         | 0        | 0       |             |
| 75  | lp_timeout                        | 1sec LowPowerTimeout from deepsleep                    | 0      |         | 0        | 0       |             |
| 76  | race_test                         | function init race                                     | 1      |         | 0        | 0       |             |
| 77  | race_test                         | class init race                                        | 0      |         | 0        | 0       |             |
| 78  | rtc                               | RTC strftime                                           | 1      |         | 1        | 0       |             |
| 79  | stl_features                      | STL std::equal                                         | 1      |         | 1        | 0       |             |
| 80  | stl_features                      | STL std::transform                                     | 1      |         | 1        | 0       |             |
| 81  | stl_features                      | STL std::sort greater                                  | 1      |         | 1        | 0       |             |
| 82  | stl_features                      | STL std::sort abs                                      | 1      |         | 1        | 0       |             |
| --  | ticker                            |                                                        |        |         |          |         |             |
| --  | timeout                           |                                                        |        |         |          |         |             |
| --  | wait_us                           |                                                        |        |         |          |         |             |
| 83  | callback                          | Testing callbacks with 0 ints                          | 1      |         | 1        | 0       |             |
| 84  | callback                          | Testing callbacks with 1 ints                          | 1      |         | 1        | 0       |             |
| 85  | callback                          | Testing callbacks with 2 ints                          | 1      |         | 1        | 0       |             |
| 86  | callback                          | Testing callbacks with 3 ints                          | 1      |         | 1        | 0       |             |
| 87  | callback                          | Testing callbacks with 4 ints                          | 1      |         | 1        | 0       |             |
| 88  | callback                          | Testing callbacks with 5 ints                          | 1      |         | 1        | 0       |             |
| 89  | callback_big                      | Testing callbacks with 0 uint64s                       | 1      |         | 1        | 0       |             |
| 90  | callback_big                      | Testing callbacks with 1 uint64s                       | 1      |         | 1        | 0       |             |
| 91  | callback_big                      | Testing callbacks with 2 uint64s                       | 1      |         | 1        | 0       |             |
| 92  | callback_big                      | Testing callbacks with 3 uint64s                       | 1      |         | 1        | 0       |             |
| 93  | callback_big                      | Testing callbacks with 4 uint64s                       | 1      |         | 1        | 0       |             |
| 94  | callback_big                      | Testing callbacks with 5 uint64s                       | 1      |         | 1        | 0       |             |
| 95  | callback_small                    | Testing callbacks with 0 uchars                        | 1      |         | 1        | 0       |             |
| 96  | callback_small                    | Testing callbacks with 1 uchars                        | 1      |         | 1        | 0       |             |
| 97  | callback_small                    | Testing callbacks with 2 uchars                        | 1      |         | 1        | 0       |             |
| 98  | callback_small                    | Testing callbacks with 3 uchars                        | 1      |         | 1        | 0       |             |
| 99  | callback_small                    | Testing callbacks with 4 uchars                        | 1      |         | 1        | 0       |             |
| 100 | callback_small                    | Testing callbacks with 5 uchars                        | 1      |         | 1        | 0       |             |
| 101 | functionpointer                   | Testing FunctionPointerArg1 compatibility              | 1      |         | 1        | 0       |             |
| 102 | functionpointer                   | Testing FunctionPointer compatibility                  | 1      |         | 1        | 0       |             |
| 103 | lp_ticker                         | 500us lp_ticker                                        | 1      |         | 1        | 0       |             |
| 104 | lp_ticker                         | 1ms lp_ticker                                          | 1      |         | 1        | 0       |             |
| 105 | lp_ticker                         | 1s lp_ticker                                           | 1      |         | 1        | 0       |             |
| 106 | lp_ticker                         | 5s lp_ticker                                           | 1      |         | 1        | 0       |             |
| 107 | lp_ticker                         | 1s lp_ticker sleep                                     | 0      |         | 0        | 0       |             |
| 108 | lp_ticker                         | 1s lp_ticker deepsleep                                 | 0      |         | 0        | 0       |             |

@RobMeades
Copy link
Contributor Author

Is the CI stuck?

@bridadan
Copy link
Contributor

@RobMeades Nope, all CI looks ok. I'll run one last check to be sure nothing else got broken in the process.

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 873

All builds and test passed!

Copy link
Contributor

@sg- sg- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of comments about licenses and code style guidelines. Please review

@@ -0,0 +1,67 @@
/******************************************************************************
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what license is this under?

@@ -0,0 +1,22 @@
/******************************************************************************
* @brief BOUDICA Platform Header
* Copyright (c) 2015 NEUL LIMITED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What license?

@@ -0,0 +1,13 @@
/******************************************************************************
* @brief Contains a define telling the rest of the code which core this is
* Copyright (c) 2015 NEUL LIMITED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license check?

@@ -0,0 +1,504 @@
/******************************************************************************
* @brief Register map for the boudica Apps core
* Copyright (c) 2015 NEUL LIMITED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license check

@@ -0,0 +1,60 @@
/******************************************************************************
* @brief BOUDICA Common peripheral Types and Register Flags Definitions Header
* Copyright (c) 2015 NEUL LIMITED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license check?

{
MBED_ASSERT(pin != (PinName)NC);

switch (mode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obj->reg_drv = &GPIO_DRIVE;

/* Claim the pins */
for (uint8_t x = 0; x < NUM_PINS; x++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


void port_mode(port_t *obj, PinMode mode)
{
switch (mode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* ----------------------------------------------------------------*/

/* Enum to identify the interrupt to the UART handler */
typedef enum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/* Timer0 handler */
void IRQ1_TMR0_Handler(void)
{
if (g_initialised)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RobMeades
Copy link
Contributor Author

RobMeades commented Sep 17, 2016

OK, I will move to the difficult to read K&R style for my braces and obtain a LICENSE.TXT for those files.

@sg-
Copy link
Contributor

sg- commented Sep 17, 2016

thanks and this should only need to apply to mbed integration files or files part of mbed OS. I tried to comment appropriately so should be all of certain directories. Any SDK, MCU or other files can maintain whichever formatting based on the project it comes from.

@sg-
Copy link
Contributor

sg- commented Sep 22, 2016

Thanks @RobMeades Can you squash these to one commit and I'll run through another review!

@RobMeades
Copy link
Contributor Author

@sg: had to rebase due to usual RTX file conflicts, now need to debug what's got broken...

@RobMeades
Copy link
Contributor Author

@sg, @bridadan: rebasing has become confusing as I've changed the case of some files and their location. I'm going to close this pull request, re-integrate onto HEAD, and send a pull request once more. Back to you later today if I don't hit problems.

@RobMeades RobMeades closed this Sep 22, 2016
@RobMeades RobMeades mentioned this pull request Sep 23, 2016
@RobMeades
Copy link
Contributor Author

@sg, @bridadan: looks as though the breakage I was seeing after rebasing could be due to commit #2642, raised in issue #2786.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants