Re: [Openocd-development] Beginners help with OpenOCD, STM3210E-EVAL and Olimex ARM-USB-TINY JTAG connector.
You are both correct. Thanks for the help! 2009/4/14 Magnus Lundin lun...@mlu.mine.nu: Hi You are just erasing one sector of the flash memory, 1k, and probalby your bin file is larger. Try something like: flash erase_sector 0 0 10 Magnus Robert Taylor wrote: Hello, I'm new to embedded development and I've just bought a STM3210E-EVAL board and an Olimex ARM-USB-TINY JTAG connector to play with. I've managed to set the tool chain and such up and I'm having trouble flashing an application. The application is from the ST example code and blinks the LEDs on and off. I've compiled an example program as follows: arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T generic-m.ld -I /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/inc -I /home/taylorr/Desktop/um0427/Libraries/CMSIS/Core/CM3 /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c /home/taylorr/Desktop/um0427/Libraries/CMSIS/Core/CM3/system_stm32f10x.c stm32f10x_it.c main.c -o hello I used objcopy as follows: arm-none-eabi-objcopy -j .text a.out hello.bin -O binary Which produces the following file: -rwxr-xr-x 1 taylorr taylorr 6156 2009-04-09 14:35 hello.bin I started OpenOCD as follows: C:\Documents and Settings\Robert Taylor\Desktopopenocd -d 3 -l openocd.log -s C:\Program Files\OpenOCD\0.1.0 -f interface\olimex-jtag-tiny-a.cfg -f board\stm3210e_eval.cfg Open On-Chip Debugger 0.1.0 (2009-01-21-21:15) Release BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: https://kc8...@svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.1.0/src /openocd.c $ User : 5 16 command.c:494 command_run_line(): Debug: 7 16 command.c:91 script_command(): script_command - log_output Debug: 8 16 command.c:108 script_command(): script_command - log_output, argv[0]=ocd_log_output Debug: 9 16 command.c:108 script_command(): script_command - log_output, argv[1]=openocd.log I used Telnet to talk to the board as follows: Open On-Chip Debugger halt target was in unknown state when halt was requested stm32x unlock 0 device id = 0x10016414 flash size = 512kbytes stm32x unlocked flash erase_sector 0 0 0 erased sectors 0 through 0 on flash bank 0 in 0.062500s flash write_bank 0 C:/Documents and Settings/Robert Taylor/Desktop/hello.bin 0 flash writing failed with error code: 0xfc7a error writing to flash at address 0x0800 at offset 0x (-902) called at file command.c, line 456 called at file embedded:startup.tcl, line 89 called at file embedded:startup.tcl, line 93 The OpenOCD log has the following information: User : 10 16 command.c:494 command_run_line(): Debug: 11 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../interface\olimex-jtag-tiny-a.cfg Debug: 13 16 command.c:91 script_command(): script_command - interface Debug: 14 16 command.c:108 script_command(): script_command - interface, argv[0]=ocd_interface Debug: 15 16 command.c:108 script_command(): script_command - interface, argv[1]=ft2232 Debug: 17 16 command.c:91 script_command(): script_command - ft2232_device_desc Debug: 18 16 command.c:108 script_command(): script_command - ft2232_device_desc, argv[0]=ocd_ft2232_device_desc Debug: 19 16 command.c:108 script_command(): script_command - ft2232_device_desc, argv[1]=Olimex OpenOCD JTAG TINY A Debug: 21 16 command.c:91 script_command(): script_command - ft2232_layout Debug: 22 16 command.c:108 script_command(): script_command - ft2232_layout, argv[0]=ocd_ft2232_layout Debug: 23 16 command.c:108 script_command(): script_command - ft2232_layout, argv[1]=olimex-jtag User : 24 16 command.c:494 command_run_line(): Debug: 25 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../board\stm3210e_eval.cfg Debug: 26 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../target/stm32.cfg Debug: 28 16 command.c:91 script_command(): script_command - jtag_khz Debug: 29 16 command.c:108 script_command(): script_command - jtag_khz, argv[0]=ocd_jtag_khz Debug: 30 16 command.c:108 script_command(): script_command - jtag_khz, argv[1]=500 Debug: 31 16 jtag.c:2645 handle_jtag_khz_command(): handle jtag khz User : 32 16 command.c:383 command_print(): 500 kHz Debug: 34 16 command.c:91 script_command(): script_command - jtag_nsrst_delay Debug: 35 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[0]=ocd_jtag_nsrst_delay Debug: 36 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[1]=100 Debug: 38 16 command.c:91 script_command(): script_command - jtag_ntrst_delay Debug: 39 16 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[0]=ocd_jtag_ntrst_delay Debug: 40 16 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[1]=100 Debug: 42
[Openocd-development] Beginners help with OpenOCD, STM3210E-EVAL and Olimex ARM-USB-TINY JTAG connector.
Hello, I'm new to embedded development and I've just bought a STM3210E-EVAL board and an Olimex ARM-USB-TINY JTAG connector to play with. I've managed to set the tool chain and such up and I'm having trouble flashing an application. The application is from the ST example code and blinks the LEDs on and off. I've compiled an example program as follows: arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T generic-m.ld -I /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/inc -I /home/taylorr/Desktop/um0427/Libraries/CMSIS/Core/CM3 /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c /home/taylorr/Desktop/um0427/Libraries/CMSIS/Core/CM3/system_stm32f10x.c stm32f10x_it.c main.c -o hello I used objcopy as follows: arm-none-eabi-objcopy -j .text a.out hello.bin -O binary Which produces the following file: -rwxr-xr-x 1 taylorr taylorr 6156 2009-04-09 14:35 hello.bin I started OpenOCD as follows: C:\Documents and Settings\Robert Taylor\Desktopopenocd -d 3 -l openocd.log -s C:\Program Files\OpenOCD\0.1.0 -f interface\olimex-jtag-tiny-a.cfg -f board\stm3210e_eval.cfg Open On-Chip Debugger 0.1.0 (2009-01-21-21:15) Release BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: https://kc8...@svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.1.0/src /openocd.c $ User : 5 16 command.c:494 command_run_line(): Debug: 7 16 command.c:91 script_command(): script_command - log_output Debug: 8 16 command.c:108 script_command(): script_command - log_output, argv[0]=ocd_log_output Debug: 9 16 command.c:108 script_command(): script_command - log_output, argv[1]=openocd.log I used Telnet to talk to the board as follows: Open On-Chip Debugger halt target was in unknown state when halt was requested stm32x unlock 0 device id = 0x10016414 flash size = 512kbytes stm32x unlocked flash erase_sector 0 0 0 erased sectors 0 through 0 on flash bank 0 in 0.062500s flash write_bank 0 C:/Documents and Settings/Robert Taylor/Desktop/hello.bin 0 flash writing failed with error code: 0xfc7a error writing to flash at address 0x0800 at offset 0x (-902) called at file command.c, line 456 called at file embedded:startup.tcl, line 89 called at file embedded:startup.tcl, line 93 The OpenOCD log has the following information: User : 10 16 command.c:494 command_run_line(): Debug: 11 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../interface\olimex-jtag-tiny-a.cfg Debug: 13 16 command.c:91 script_command(): script_command - interface Debug: 14 16 command.c:108 script_command(): script_command - interface, argv[0]=ocd_interface Debug: 15 16 command.c:108 script_command(): script_command - interface, argv[1]=ft2232 Debug: 17 16 command.c:91 script_command(): script_command - ft2232_device_desc Debug: 18 16 command.c:108 script_command(): script_command - ft2232_device_desc, argv[0]=ocd_ft2232_device_desc Debug: 19 16 command.c:108 script_command(): script_command - ft2232_device_desc, argv[1]=Olimex OpenOCD JTAG TINY A Debug: 21 16 command.c:91 script_command(): script_command - ft2232_layout Debug: 22 16 command.c:108 script_command(): script_command - ft2232_layout, argv[0]=ocd_ft2232_layout Debug: 23 16 command.c:108 script_command(): script_command - ft2232_layout, argv[1]=olimex-jtag User : 24 16 command.c:494 command_run_line(): Debug: 25 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../board\stm3210e_eval.cfg Debug: 26 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../target/stm32.cfg Debug: 28 16 command.c:91 script_command(): script_command - jtag_khz Debug: 29 16 command.c:108 script_command(): script_command - jtag_khz, argv[0]=ocd_jtag_khz Debug: 30 16 command.c:108 script_command(): script_command - jtag_khz, argv[1]=500 Debug: 31 16 jtag.c:2645 handle_jtag_khz_command(): handle jtag khz User : 32 16 command.c:383 command_print(): 500 kHz Debug: 34 16 command.c:91 script_command(): script_command - jtag_nsrst_delay Debug: 35 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[0]=ocd_jtag_nsrst_delay Debug: 36 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[1]=100 Debug: 38 16 command.c:91 script_command(): script_command - jtag_ntrst_delay Debug: 39 16 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[0]=ocd_jtag_ntrst_delay Debug: 40 16 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[1]=100 Debug: 42 16 command.c:91 script_command(): script_command - reset_config Debug: 43 16 command.c:108 script_command(): script_command - reset_config, argv[0]=ocd_reset_config Debug: 44 16 command.c:108 script_command(): script_command - reset_config, argv[1]=trst_and_srst Debug: 45 16 jtag.c:1892 jim_newtap_cmd(): Creating New Tap, Chip: stm32, Tap: cpu, Dotted: stm32.cpu, 8 params Debug:
Re: [Openocd-development] Beginners help with OpenOCD, STM3210E-EVAL and Olimex ARM-USB-TINY JTAG connector.
Instead of all the commands you use, just do 'reset halt' and then flash write_image erase file_name.extension 0 bin 4\/3!! ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Beginners help with OpenOCD, STM3210E-EVAL and Olimex ARM-USB-TINY JTAG connector.
Hi You are just erasing one sector of the flash memory, 1k, and probalby your bin file is larger. Try something like: flash erase_sector 0 0 10 Magnus Robert Taylor wrote: Hello, I'm new to embedded development and I've just bought a STM3210E-EVAL board and an Olimex ARM-USB-TINY JTAG connector to play with. I've managed to set the tool chain and such up and I'm having trouble flashing an application. The application is from the ST example code and blinks the LEDs on and off. I've compiled an example program as follows: arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T generic-m.ld -I /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/inc -I /home/taylorr/Desktop/um0427/Libraries/CMSIS/Core/CM3 /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c /home/taylorr/Desktop/um0427/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c /home/taylorr/Desktop/um0427/Libraries/CMSIS/Core/CM3/system_stm32f10x.c stm32f10x_it.c main.c -o hello I used objcopy as follows: arm-none-eabi-objcopy -j .text a.out hello.bin -O binary Which produces the following file: -rwxr-xr-x 1 taylorr taylorr 6156 2009-04-09 14:35 hello.bin I started OpenOCD as follows: C:\Documents and Settings\Robert Taylor\Desktopopenocd -d 3 -l openocd.log -s C:\Program Files\OpenOCD\0.1.0 -f interface\olimex-jtag-tiny-a.cfg -f board\stm3210e_eval.cfg Open On-Chip Debugger 0.1.0 (2009-01-21-21:15) Release BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: https://kc8...@svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.1.0/src /openocd.c $ User : 5 16 command.c:494 command_run_line(): Debug: 7 16 command.c:91 script_command(): script_command - log_output Debug: 8 16 command.c:108 script_command(): script_command - log_output, argv[0]=ocd_log_output Debug: 9 16 command.c:108 script_command(): script_command - log_output, argv[1]=openocd.log I used Telnet to talk to the board as follows: Open On-Chip Debugger halt target was in unknown state when halt was requested stm32x unlock 0 device id = 0x10016414 flash size = 512kbytes stm32x unlocked flash erase_sector 0 0 0 erased sectors 0 through 0 on flash bank 0 in 0.062500s flash write_bank 0 C:/Documents and Settings/Robert Taylor/Desktop/hello.bin 0 flash writing failed with error code: 0xfc7a error writing to flash at address 0x0800 at offset 0x (-902) called at file command.c, line 456 called at file embedded:startup.tcl, line 89 called at file embedded:startup.tcl, line 93 The OpenOCD log has the following information: User : 10 16 command.c:494 command_run_line(): Debug: 11 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../interface\olimex-jtag-tiny-a.cfg Debug: 13 16 command.c:91 script_command(): script_command - interface Debug: 14 16 command.c:108 script_command(): script_command - interface, argv[0]=ocd_interface Debug: 15 16 command.c:108 script_command(): script_command - interface, argv[1]=ft2232 Debug: 17 16 command.c:91 script_command(): script_command - ft2232_device_desc Debug: 18 16 command.c:108 script_command(): script_command - ft2232_device_desc, argv[0]=ocd_ft2232_device_desc Debug: 19 16 command.c:108 script_command(): script_command - ft2232_device_desc, argv[1]=Olimex OpenOCD JTAG TINY A Debug: 21 16 command.c:91 script_command(): script_command - ft2232_layout Debug: 22 16 command.c:108 script_command(): script_command - ft2232_layout, argv[0]=ocd_ft2232_layout Debug: 23 16 command.c:108 script_command(): script_command - ft2232_layout, argv[1]=olimex-jtag User : 24 16 command.c:494 command_run_line(): Debug: 25 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../board\stm3210e_eval.cfg Debug: 26 16 configuration.c:88 find_file(): found C:\Program Files\OpenOCD\0.1.0\bin\../target/stm32.cfg Debug: 28 16 command.c:91 script_command(): script_command - jtag_khz Debug: 29 16 command.c:108 script_command(): script_command - jtag_khz, argv[0]=ocd_jtag_khz Debug: 30 16 command.c:108 script_command(): script_command - jtag_khz, argv[1]=500 Debug: 31 16 jtag.c:2645 handle_jtag_khz_command(): handle jtag khz User : 32 16 command.c:383 command_print(): 500 kHz Debug: 34 16 command.c:91 script_command(): script_command - jtag_nsrst_delay Debug: 35 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[0]=ocd_jtag_nsrst_delay Debug: 36 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[1]=100 Debug: 38 16 command.c:91 script_command(): script_command - jtag_ntrst_delay Debug: 39 16 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[0]=ocd_jtag_ntrst_delay Debug: 40 16 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[1]=100 Debug: 42 16 command.c:91 script_command(): script_command - reset_config