Hi, having used Keil's uVision 4, I was used to call it with command line parameters to provide a set of uvproj-uvopt-axf files, allowing it to setup trace, flash the axf file, set a log file, do code coverage and run until it stops at a specified point :
keil.com/support/man/docs/uv4/uv4_debug_commands.htm
Basically, the script file would looks like this :
Display All
Now using J-Link Commander, is it possible to do something similar in functionalities ?
wiki.segger.com/J-Link_Commander
Cheers.
keil.com/support/man/docs/uv4/uv4_debug_commands.htm
Basically, the script file would looks like this :
Brainfuck Source Code
- /*-------------------------------------------------------------------
- ** Define the function to enable the trace port
- **-----------------------------------------------------------------*/
- FUNC void EnableTPIU(void) {
- _WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000010); // RCC_AHB1ENR: IO port E clock enable
- _WDWORD(0x40021000, 0x00002AA0); // GPIOE_MODER: PE2..PE6 = Alternate function mode
- _WDWORD(0x40021008, 0x00001550); // GPIOx_OSPEEDR: PE2..PE6 = 25 MHz Medium speed
- _WDWORD(0x4002100C, 0x00001550); // GPIOx_PUPDR: PE2..PE6 = Pull-up
- _WDWORD(0x40021020, 0x00000000); // GPIOx_AFRL: PE2..PE6 = AF0
- _WDWORD(0xE0042004, 0x000000E0); // Set DBGMCU_CR : - E0 --> Sync 4 bit
- }
- /*-------------------------------------------------------------------
- ** Invoke the function at debugger startup
- **-----------------------------------------------------------------*/
- EnableTPIU();
- /*-------------------------------------------------------------------
- ** Execute upon software RESET
- **-----------------------------------------------------------------*/
- FUNC void OnResetExec(void) {
- EnableTPIU();
- }
- Load "boot.axf" INCREMENTAL
- Load "test.axf" INCREMENTAL
- slog > test.printf.log
- g,testEnd
- slog off
- /* Create and save coverage information including assembly instructions */
- log > test.cov_asm.log
- coverage asm
- log off
- /* Create and save the statistics about the executed code */
- log > test.cov_result.log
- coverage
- log off
- /* Create and save the code coverage to a file.cov */
- coverage save test.cov_save.cov
- exit
wiki.segger.com/J-Link_Commander
Cheers.