-
Notifications
You must be signed in to change notification settings - Fork 3k
add support for SILICA_SENSOR_NODE platform #5104
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
Conversation
@architech-boards It looks like you based this on a release. We can only accept pull requests (PRs) based on master. Please rebase your PR onto master. |
@architech-boards While your link is correct, "uVision 5.24.2.0" is not the IDE or version of IAR. |
You are right, IAR is 7.80.2.11975. |
@theotherjimmy I rebased my commits, I'm not sure if it is ok now, commands used: |
@architech-boards It looks like yo did a rebase correctly. I still see Anna's "Added versioning define block for new minor release." commit, which is what originally indicated to me that you based this branch on a release (she only adds that commit, and others like it, to the release branches). |
Yes exactly, I don't know how to remove Annas's commit. I tried but unsuccessfully. Thanks. |
You could do an interactive rebase ( |
@@ -31,7 +31,7 @@ | |||
|
|||
/* Heap for NanoStack */ | |||
#if !MBED_CONF_MBED_MESH_API_USE_MALLOC_FOR_HEAP | |||
static uint8_t app_stack_heap[MBED_CONF_MBED_MESH_API_HEAP_SIZE + 1]; | |||
static uint8_t app_stack_heap[MBED_CONF_MBED_MESH_API_HEAP_SIZE + 1] __attribute__(( section( "mesh_heap") )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change? I believe this section is not defined for all targets. Or is this valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L476JG memory is splitted in 2 banks with not consecutive addresses. In the original project only 96kb SRAM1 is used but this memory is not enought for the project. We moved this array to the 32kb SRAM2 bank which the original project don't use. See the STM32L476XX.ld file modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is target specific then, should not be in this code, you should be able to place object files in the sections (might be better place in the linker to do this than in this generic file).
@SeppoTakalo please review this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the STM32L476XX.ld file with:
.mesh_heap (COPY):
{
*mesh_system.o
} > SRAM2
and removed attribute(( section( "mesh_heap") ));
The bin file is built without errors and the .map files seems good: mbed-os-sensor-node.map.txt
but when I compile this mbed-os version for the mbed-os-example-client the demo doesn't run:
Starting mbed Client example
[EasyConnect] IPv6 mode
[EasyConnect] Using Mesh
[EasyConnect] Connecting to Mesh..
[EasyConnect] MAC address
[EasyConnect] Connection to Network Failed -3012!
Connection to Network Failed - exiting application...
Please can you help me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SeppoTakalo might be able to help out a bit more, but well - more logs would definitely be needed. Easy-connect itself does nothing there, it's just abstracting the network stack differences into one function we call from the app side.
@SeppoTakalo - we have one of those boards available here in Oulu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that there is some funny thing on-going with the MAC address. In all normal scenarios the MAC address printing should work - however, in case - there is no MAC? Is the radio driver working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that there is some funny thing on-going with the MAC address.
Yes it's true. In the mbed_app.json I have: "spirit1.mac-address": "{0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23}"
This with trace enabled:
Starting mbed Client example
[EasyConnect] IPv6 mode
[EasyConnect] Using Mesh
[EasyConnect] Connecting to Mesh..
[DBG ][SPIRIT]: rf_register (728)
[DBG ][SPIRIT]: rf_ack_loop (608)
[DBG ][SPIRIT]: rf_register (775)
[EasyConnect] MAC address
[EasyConnect] Connection to Network Failed -3012!
Connection to Network Failed - exiting application...
If I comment this (just for test):
/*.mesh_heap (COPY):
{
mesh_system.o
} > SRAM2/
from the .ld file, the radio works:
Starting mbed Client example
[EasyConnect] IPv6 mode
[EasyConnect] Using Mesh
[EasyConnect] Connecting to Mesh..
[DBG ][core]: Allocate Root Tasklet
[DBG ][6lo ]: P.Init
[DBG ][core]: NS Root task Init
[DBG ][sck ]: Socket Tasklet Generated
[DBG ][SPIRIT]: rf_register (728)
[DBG ][SPIRIT]: rf_ack_loop (608)
[DBG ][SPIRIT]: rf_interface_state_control (466)
[DBG ][SPIRIT]: rf_register (775)
[DBG ][SPIRIT]: get_mac_address (797)
[DBG ][SPIRIT]: rf_get_mac_address (559), adr0=23, adr1=23, adr2=23, adr3=23, adr4=23, adr5=23, adr6=23, adr7=23
[DBG ][SPIRIT]: rf_set_mac_address (547), adr0=23, adr1=23, adr2=23, adr3=23, adr4=23, adr5=23, adr6=23, adr7=23
[DBG ][SPIRIT]: rf_set_mac_address (547), adr0=23, adr1=23, adr2=23, adr3=23, adr4=23, adr5=23, adr6=23, adr7=23
[DBG ][nslp]: connect()
[DBG ][mle ]: MLE service init size 32
[DBG ][sck ]: Socket id 0 allocated
[DBG ][m6LND]: Using PSK security mode.
[DBG ][m6LND]: Channel: 1
[DBG ][m6LND]: Channel page: 2
[DBG ][m6LND]: Channel mask: 2
[DBG ][mMIB]: Set key 1
[INFO][addr]: Address added to IF 1: fe80::2123:2323:2323:2323
But without my original modification the client won't connect to the mbed connector due to memory overflow problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we all agree this change should not be here, and we need to identify the root cause of this problem.
@JanneKiiskila you noted that you have these boards in Oulu, or @MarceloSalazar in Cambridge to reproduce the problems they are having?
mbed.h
Outdated
#endif | ||
|
||
#define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch)) | ||
#define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION) #define MBED_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pinpointed earlier, please rebase interactively to remove this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, rebase done, removed the commit
@architech-boards Let us know if you need any assistance with rebase |
This seems to add new platform, but what is the radio driver? |
@architech-boards could you please share links to your forked mesh-minimal and client application (pointing at this PR mbed OS branch) to help us investigate further? |
This seems to add new platform, but what is the radio driver?
This is a porting from mbed-os-example-client. It uses the last mbed-os version. could you please share links to your forked mesh-minimal and client application (pointing at this PR mbed OS branch) to help us investigate further? |
@architech-boards Also, what you linked, points to private clone of Easy-connect. However it links to main Spirit RF driver with quite new Git hash, so it seems OK.
|
Please, try to compile my repository, you will see that the mesh works. And the clients connects to the mbed connector. I think the problem is about .ld file. |
Hello, I forked and changed 2 repositories as requested. These repos work with our board. https://github.com/architech-boards/mbed-os-example-mesh-minimal nb. use my json file from the "configs" directory |
We'll get that new config added to the mbed-os-example-client repo easily. When can we have the required mbed-os changes in? |
I would like to move this target along. As we are having problem with client, do you think we should split this (simplify) patch? The nanostack change should not be here as noted previously. @architech-boards what do you think? |
Any update? Please can yo uresolve conflict (rebase will also eliminate circle-ci failure plus possibly jenkins cI). What is the status of client failures with linker script update to place mesh in the second RAM bank? |
Where are the linker files for IAR and ARM toolchains? This adds support only for GCC. |
It inherits from STM32L476JG thus getting the same support (all 3 toolchains), verified via targats.json file edit here and files for STM32L476xG. This means that whatever change is needed for that mesh, needs to be done in all 3 linker files (better organization of 2 RAM banks) for connectivity |
Then why do they provide linker file for GCC instead of inheriting it also? Getting target to work with Mbed OS is one goal, getting enough RAM to run it with mesh application is another goal. These two should be handled in separate pull requests. |
Agree, the same proposal I made above. @architech-boards Please see the latest comments, and tell us what you think.
Not certain here. there could be then 2 linker script files here. @architech-boards Can you review the inheritance, and which linker scripts are provided, clarify please. |
We have talked yesterday with @MarceloSalazar and we agree about remove our LD file and the attribute in the mesh_system.c. Our priority now is get the target to work with Mbed OS. So getting enought RAM to run it with mesh application is not important at this point.
@MarceloSalazar knows the details about the memory problem because yesterday we have talked with him about why there is this problem. I think he will talk to you internally. |
First, rebase your branch on top of latest master (resolve the conflict that is here). look at ``git rebase master` once master is up to date (your local master = upstream/master). You can then just create a new commit to revert that nanostack change, or use |
I rebased it and I created a new commit to revert that nanostack change. For me it is ready to be reviewed and merged. Thank you! |
Build : SUCCESSBuild number : 128 Triggering tests/test mbed-os |
Changes look good to me now. Waiting for CI to complete |
/morph build |
Build : SUCCESSBuild number : 179 Skipping test trigger, missing label 'NEED CI' |
Build : SUCCESSBuild number : 186 Triggering tests/test mbed-os |
Test : FAILUREBuild number : 86 |
/morph test |
Test : FAILUREBuild number : 91 |
/morph build |
Build : SUCCESSBuild number : 221 Triggering tests/morph test |
/morph uvisor-test |
Test : SUCCESSBuild number : 110 |
Tests done with 3 toolchains on Windows: