STARTUP_FROM_RESET (STM32_Startup.s)
there are lots of posts on how to get a board running stand-alone.
However I tried putting STARTUP_FROM_RESET in all the relevant places and still no go.
To check what was going on in the STM32_Startup.s file, I put
#ifndef STARTUP_FROM_RESET
#error
#endif
And it error-ed until I put
#define STARTUP_FROM_RESET
directly before the test.
So I can get it to work stand alone, and the debugger connects.... usually so I can recover OK.
But what am I doing wrong in following the clear instruction.....
"To define STARTUP_FROM_RESET select the startup code in the the project explorer,
right click, select Properties and then add STARTUP_FROM_RESET to the
Preprocessor > Preprocessor Definitions project property."
The only place I can see to add it is in the common configuration of the STM32_Startup.s file..
Cheers.
Pete L.
-
> The only place I can see to add it is in the common configuration of the STM32_Startup.s file..
No, you place it in the Release configuration. You can set this in the Properties Window after selecting the project node. You will need to change the Properties Window configuration dropdown to select Release configuration.
-
OK that sounds straight forward, but still not getting it right. (I'm using version 3RC).
I have an active config of "THUMB Release", I click on the project node which expands to see my project files, in the properties window I select the Release Config, (Public or Private I tried both). I see under (Favorites) Preprocessor Definitions select and type in STARTUP_FROM_RESET.
Also
If I expand the "Project Properties" I see (Favorites) Preprocessor Definitions, select and add it here as well, which now looks like this
NESTED_INTERRUPTS
CTL_TASKING
USE_PROCESS_STACK
assert_param(expr) ((void)0);
STARTUP_FROM_RESETAnd still in the file STM32_Startup.s, STARTUP_FROM_RESET is not defined.
I can add it in manually and it works.
Pete L
-
Pete, there is more than one way to do this. What I do is to right-click on the project name in the Project Explorer, and then click on Properties down at the bottom of the pop-up. This opens the Project Manager window. From there, select Release under Private Configurations and then scroll down to the Preprocessor Options. Add STARTUP_FROM_RESET to Preprocessor Definitions and then click the OK button.
Sounds like a lot of steps but it really takes longer to describe it than to do it.
Do ensure that you leave the Project Manager via the OK button and don't just close it with the [X] box.
-
HI Richard, thanks for the detail, however if I follow your path, I don't have the "Preprocessor Definations" in the Preprocessor Options!
All I see is
"Ignore includes
Preprocessor Undefinitions
System Include Directories
Undefine All preprocessor Definitions"
I do have the option under Favorites at the top, and in there I see STARTUP_FROM_RESET already defined from my previous efforts.
This all seems rather silly, I think I'll just mod the startup file when needed.
Thanks for your help.
Cheers.
Pete L.
Please sign in to leave a comment.
Comments
4 comments