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

Make install stm32x device protected error #76

Open
songproducer opened this issue Jun 10, 2019 · 1 comment
Open

Make install stm32x device protected error #76

songproducer opened this issue Jun 10, 2019 · 1 comment

Comments

@songproducer
Copy link

  Prerequisite '../cube/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030xc.s' is older than target '../bin/main.elf'.
  No need to remake target '../bin/main.elf'.
 Finished prerequisites of target file 'install'.
Must remake target 'install'.
sudo openocd --file openocd.cfg --command "program ../bin/main.elf verify reset exit"
Putting child 0x72f8b0 (install) PID 1772 on the chain.
Live child 0x72f8b0 (install) PID 1772 
Open On-Chip Debugger 0.10.0 (2019-06-10-11:18)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 23
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_push_pull connect_deassert_srst
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_push_pull connect_deassert_srst
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 1001 kHz
Info : SWD DPIDR 0x0bb11477
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f0x.cpu       cortex_m   little stm32f0x.cpu       halted
adapter speed: 1001 kHz
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0xc1000003 pc: 0xfffffffe msp: 0xfffffffc
adapter speed: 1001 kHz
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0xc1000003 pc: 0xfffffffe msp: 0xfffffffc
adapter speed: 4061 kHz
** Programming Started **
auto erase enabled
Info : device id = 0x10006444
Info : flash size = 32kbytes
Error: stm32x device protected
Error: failed erasing sectors 0 to 15
** Programming Failed **
shutdown command invoked

Reaping losing child 0x72f8b0 PID 1772 
Makefile:40: recipe for target 'install' failed
make: *** [install] Error 1
Removing child 0x72f8b0 PID 1772 from chain.
@AR17HY
Copy link

AR17HY commented Jan 16, 2022

Error: stm32x device protected => use ST-link utility to unlock your memory (you can keep the boot-loader section protected)
If it is no enough, you might need to change the flash address in your Linker

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