Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flashing of a template project without verbose option fails #3

Closed
demling opened this issue Dec 20, 2018 · 1 comment
Closed

flashing of a template project without verbose option fails #3

demling opened this issue Dec 20, 2018 · 1 comment

Comments

@demling
Copy link

demling commented Dec 20, 2018

There's a superfluous silencer $(Q) placed in the makefile

$(Q)$(OOCD) -f $(OOCD_FILE) \

that causes an @ character to be placed in front of the openocd command

$ make -n flash
printf " FLASH\tyour-project.elf\n"
(echo "halt; program /home/dem/Code/your-project/my-project/your-project.elf verify reset" | nc -4 localhost 4444 2>/dev/null) ||
@openocd -f ../board/bluepill.cfg
-c "program /home/dem/Code/your-project/my-project/your-project.elf verify reset exit"
2>/dev/null

which makes make flash fail unless the verbose option is added.

$ make flash
CC my-project.c
CC ../my-common-code/api.c
GENLNK stm32f103c8t6
LD your-project.elf
FLASH your-project.elf
../rules.mk:147: recipe for target 'your-project.flash' failed
make: *** [your-project.flash] Error 127

$ make V=1 flash
CC my-project.c
arm-none-eabi-gcc -Os -std=c99 -ggdb3 -mcpu=cortex-m3 -mthumb -msoft-float -fno-common -ffunction-sections -fdata-sections -Wextra -Wshadow -Wno-unused-variable -Wimplicit-function-declaration -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -MD -Wall -Wundef -I. -I../my-common-code -I. -I../libopencm3/include -I. -I../my-common-code -I. -I../libopencm3/include -DSTM32F1 -DSTM32F103C8T6 -I../libopencm3/include -o bin/my-project.o -c my-project.c
CC ../my-common-code/api.c
arm-none-eabi-gcc -Os -std=c99 -ggdb3 -mcpu=cortex-m3 -mthumb -msoft-float -fno-common -ffunction-sections -fdata-sections -Wextra -Wshadow -Wno-unused-variable -Wimplicit-function-declaration -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -MD -Wall -Wundef -I. -I../my-common-code -I. -I../libopencm3/include -I. -I../my-common-code -I. -I../libopencm3/include -DSTM32F1 -DSTM32F103C8T6 -I../libopencm3/include -o bin/api.o -c ../my-common-code/api.c
GENLNK stm32f103c8t6
arm-none-eabi-gcc -E -mcpu=cortex-m3 -mthumb -msoft-float -DSTM32F1 -DSTM32F103C8T6 -D_ROM=64K -D_RAM=20K -D_ROM_OFF=0x08000000 -D_RAM_OFF=0x20000000 -P -E ../libopencm3/ld/linker.ld.S > generated.stm32f103c8t6.ld
LD your-project.elf
arm-none-eabi-gcc -Tgenerated.stm32f103c8t6.ld -L../libopencm3/lib -nostartfiles -mcpu=cortex-m3 -mthumb -msoft-float -specs=nano.specs -Wl,--gc-sections -L../libopencm3/lib bin/my-project.o bin/api.o -lopencm3_stm32f1 -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -o your-project.elf
FLASH your-project.elf
(echo "halt; program /home/dem/Code/your-project/my-project/your-project.elf verify reset" | nc -4 localhost 4444 2>/dev/null) ||
openocd -f ../board/bluepill.cfg
-c "program /home/dem/Code/your-project/my-project/your-project.elf verify reset exit" \

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
0x2000
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.229062
Info : STM32F103C8T6.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000430 msp: 0x20005000
** Programming Started **
auto erase enabled
Info : device id = 0x20036410
Info : flash size = 128kbytes
wrote 2048 bytes from file /home/dem/Code/your-project/my-project/your-project.elf in 0.548013s (3.650 KiB/s)
** Programming Finished **
** Verify Started **
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20005000
verified 1232 bytes in 0.380016s (3.166 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

@karlp karlp closed this as completed in 550c702 Dec 30, 2018
@karlp
Copy link
Member

karlp commented Dec 30, 2018

thanks for reporting this, sorry it took so long to fix it!

Podendo added a commit to Podendo/stm32f407vg-usb-dice-generator that referenced this issue May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants