2017-10-04 10:31 AM
Our application (SensorTile L476) works well when programmed and run from our SWD programmer (Nucleo 476). However, once untethered from SWD, if we disconnect and reconnect the battery, the CPU stays in Reset and never exits.
We discovered a fix, check 'Run Application' in 'Automatic Mode' in ST-Link GUI, then program device. This works.
What bit(s) is 'Run Applcation' changing in our device's FLASH to allow it to function? My suspicion is the Option Bytes but I haven't yet found a bit to perform this function.
Does CLI support 'Run Application'? (I've looked and can't find it)
The command line is quite efficient and our preferred interface and we are hoping for the same functionality in both interfaces.
Thanks, Chris
2017-10-04 01:26 PM
I watched the ST video on Option Bytes via the Utility. I inspected the Option Bytes (at least those shown by ST-Link) and they are IDENTICAL between my failing board (hung in reset) and my successful board (boots normally).
However, there must be some difference in FLASH somewhere because I am removing power (battery) and reapplying it...confused. Are there other bytes/bits hidden somewhere that 'Run Applications sets/alters?
Thanks
2017-10-04 01:40 PM
I think I figured it out. Our app starts at 08004000, but I did a memory dump back to 0x00000000. My bad, I think. It appears that 'Run Application' loads the low FLASH with vectors and run-time code (I think) -- is this right?
I'd rather get full control over all the code/vector-tables. I haven't done any research yet (I will) but I'm guessing I need to alter something in the link process so it includes the vector tables and run-time code.
Did I get it right? Is there a good example of this process? Thanks
2017-10-06 11:27 AM
,
,
Hi,
you can have a look at chapter 1.5 (The boot process) of the FP-SNS-ALLMEMS1 User Manual (
http://www.st.com/resource/en/user_manual/dm00287877.pdf
,) that explain how to setup the application in order to run from address 0x08004000 (provided that a bootloader is present at base address 0x08000000).On the contrary, if you want the application to run from base address just define the Vector table offset to 0
, , , ♯ define VECT_TAB_OFFSET 0x0
and define ROM section start address and vector table address to
0x08000000
,in the linker script.