where are the 'inc' directories & can the target be Reset
Hi, I’ve got a basic program working from
FW_V1.9.0\Projects\STM324xG_EVAL\Examples\UART\UART_Hyperterminal_IT
by following “UM1730 sect 4.1 SW4STM32”
(also repeated here http://www.openstm32.org/Importing+a+STCubeMX+generated+project)
I created an AC6/Eclipse workspace - “uPyCubeAa” and then copied in the above CubeMX directory structure
From eclipse I File -import-General-Existing Projects = specify the directory above
Then I build - and it compiles sucessfully - fantastic.
I create a Debug Configuration modifying Debug to “Mnaual spec” and Debug Device ST-LinkV2-1 & Debug Interface SWD
I have a NUCLEO-401RE board that I’ve hot wried to my target board including NRST and removed the two ST-LINK jumpers.
The ST-Link has been upgraded and “DETAILS.TXT” says Version: 0221 Build: Apr 29 2015 13:11:12
The target board is pyboard.org F405RGT6, not the STM324xG_EVAL F407 but I’m hoping this is close enough.
Then I press the debug.
It loads over the SWD and I can single step it. Fantastic.
Now I need to make some modifications to the board definitions in the include files.
I start poking around in the Eclipse “Project Explorer” - but can’t find a directory representing the “inc” files.
Is there one?
How should I add a project specific include.h file - I tried a number methods and the .h files ended up in strange unexpected places, and then didn’t seem like I could put a search path to them !
So I take the project define file “stm324xg_eval.h” and modify the LEDS defintion for my target.
I build and download again, and single step.
The pointer into the source file starts off correct, but after a couple of “step over” over init routines points into the top of the file, and then seems to find the right place.
I press the Terminate button to stop the ST-Link.
So I change the optomization on the compiler to -O0 (none) from -Os (size).
And start again, rebuilding.
So now it behaves.
Now I step into a BSP_LED_Init()
The changes I’ve made to the file - get into a problem - and the ST-Link stops working.
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f4x.cpu failed, GDB will be halted. Polling again in 6300ms”
The Reset button is greyed out, so I guess that is not working.
I try pressing the Terminate button and then the Debug.
At the same time I monitor the hardware NRST line - it remains inactive high.
Then I try to launch again pressing the Debug and I get an error in Launch Sequence.
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
localhost:3333: The system tried to join a drive to a directory on a joined drive.
localhost:3333: The system tried to join a drive to a directory on a joined drive.
which I think means GDB has failed.
To get control, I have to exit Eclipse, power down the target board, remove the ST-Link USB mini connector,
then reinsert ST-Link USB mini, power the target board - NRST is now active low.
Then startup Eclipse, and press button Debug selecting “STM324FxG_EVAL Debug”
It now links the target, ST-Link releases NRST and downloads the .ELF successfully.
So is there a way of enabling a reset on the target board?