Comments (2)
I have never tried running a C++ application on the stack for embedded, but I would expect name mangling difference between C and C++ being the issue here. I saw that you added an extern "C"
block around the code, but I wonder if the bootstrap function itself would need to be declared with extern "C"
as wel? A long time ago we where able to run the stack as part of an OMNET++ based simulation, which meant it was useable from within a C++ program, but this was on the PC host not on the embedded target. You can still see the __LINK_C
define from link_c.h
being used in function definitions. My guess is that it would need to be added for bootstrap()
and probably others as well. If you comment to call to bootstrap()
do you still crash? Can you break in __framework_bootstrap()
?
from sub-iot-stack.
I looked a bit further into the problem and the code seems to crash on assembly code. The code crashed in the init_clock() function of stm32_common_mcu.c file when initialising the RCC structs. The debugger would go into memset assembly code where the program would throw a hardfault. The structs can be seen in the image below. I did put the = {0) in comments so the code would continue.
Later the code would crash in stm32l0xx_hal_rcc.h line 1201 that line of code would also lead to an assembly file because of calculation with unsigned 32 bit integers. It would lead to __aeabi_dadd.csdasm and would crash on the line of code which can be seen in the figure below.
So when compiling C++ for the B-L072Z-LRWAN1 the code does crash before the main loop is even called.
from sub-iot-stack.
Related Issues (20)
- noise_logger.c compile fails - userbutton.h not found HOT 2
- sniffer.c compile fails - alp_cmd_handler.h not found HOT 1
- I2C on B_L072Z_LRWAN1 platform HOT 2
- Sensor Action example: assertion "is_fs_init_completed" failed HOT 1
- Sensor Action example: incorrect value in RTT logs HOT 4
- STM32 hw_get_unique_id() bug HOT 4
- Gateway software ? HOT 1
- RTT Logging does not work well with Sleep
- Performance results available? HOT 1
- Bug scheduling messages in the unsollicited response callback HOT 8
- Board resets when sending message using default access class at index 1 set to normal rate. HOT 6
- Scheduler hangs when scheduling a task through interrupt service routine HOT 1
- Enforce .clang-format
- Assertion fail in timer_fired() HOT 5
- Some compiler flags that cause errors now that might be worth it to be fixed HOT 2
- ALP_ITF_ID_D7ASP interface config format doesn't seem to match spec (same with pyd7a impl) HOT 2
- One-Hop Routing HOT 2
- ALP layer: unsolicited commands are sent back in the response HOT 1
- Compilation Error while running make HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sub-iot-stack.