Closed sn00pster closed 5 years ago
Also pin pulldown must be configured.
Also pin pulldown must be configured.
probably should be an option to configure pull up, down or none.
in our case on our hardware the pin has an external pull down which is weak as we are current concious and every microamp counts.
i have forked this, i have some other changes i am going to implement so will send a pull request with those when i am done.
Pullup on the bootstrap pin is enabled for the very short time (for 8 readouts) after reset. After this GPIO will be restored to the default state. FYI. You don't need to invert pin readout in the R2. Just replace cbz by cbnz in the line 173 https://github.com/dmitrystu/sboot_stm32/blob/master/mcu/stm32l4xx.S#L173
I've created a pull request with this functionality:
It was a my mistake to use cbnz for the high level. It will break doublereset and softreset activation. I have made correct commit. Tested with F103 and L433.
Ok, cool, I will use this and will pull in the changes and disregard mine for the pullup/down configuration. Many thanks for this
Thank you for your answer. But after to have search and search, i arrive now to launch make command. But i have many errors when i run specicy CMD you have given : ACER i5@SORO_KOLO MINGW64 ~/Desktop/sboot_stm32-master $ make stm32l052x8 C:/Program Files/Git/mingw64/bin/make fwclean bootloader FWCPU='-mcpu=cortex-m0plus' \ FWSTARTUP='mcu/stm32l0xx.S' \ FWDEFS='STM32L0 STM32L052xx USBD_ASM_DRIVER' \ LDPARAMS='ROMLEN=64K RAMLEN=8K' make[1]: Entering directory 'C:/Users/ACER i5/Desktop/sboot_stm32-master' compiling src/arc4.c compiling src/chacha.c compiling src/gost.c compiling src/raiden.c compiling src/rc5.c compiling src/speck.c compiling src/xtea.c compiling src/blowfish.c compiling src/rtea.c assembling mcu/stm32l0xx.S compiling src/descriptors.c src/descriptors.c:19:19: fatal error: stm32.h: No such file or directory
^
compilation terminated. make[1]: [Makefile:110: build/objfw/descriptors.o] Error 1 make[1]: Leaving directory 'C:/Users/ACER i5/Desktop/sboot_stm32-master' make: [Makefile:263: stm32l052x8] Error 2
It's easy. You needs
Somepath/Cmsis root <--- CMSIS root. Point CMSIS envar here.
+-CMSIS <--- generic CMSIS from ARM
+-Device
+-ST <--- ST Vendor folder
+-STM32F0xx
+-STM32L0xx
+- stm32.h
Hi, I still wanted to thank you for the great job you did and also for the attention you pay to my requests. So I must say that it's probably easy for you all that, but me now I risk exploding a thermometer if it approaches near my head (so I'm struggling to get out). It's very new to me it's line of code, until then I was abitute to run programs and it's all or more to write some lines with arduino and that's it! Please help me, I spend sleepless nights now. To begin: I downloaded CMSISV5 from ARM, I work with the STM32F103T8, i work on Windows 10 and I would like to install a secure bootloader (not to mention that just a few days ago I started in the stm32 universe) and to tell the truth, I can not exploit the information that you have just given me. I am very self taught, and I am sure that by realizing some examples for me, then I will be able to gradually get out of it: - / thank you sincerely
Hello ! How are you ! Thank you for your bigest help you have given to me. I am on the way to build a bootloader from your project, but my problem now is : "4 Set environmental variable CMSIS to point to CMSIS root folder". Thank you for your help 👍
Hi. Sorry for the late reply. There is some options to do this:
mingw32-make CMSIS='C:/path/to/the/cmsis/root' target_to_make
CMSIS ?= $(abspath ../CMSIS) -> CMSIS ?= 'C:/path/to/the/cmsis/root'
PS. Not sure about using quotes under Win.Hello !!! Thank you for your kindness ! I have done all you told to me, but i have error :-/
I want to build a bootloader for stm32f103c8x6, when i run "make stm32f103x8", i have this :
thank you very match for your helpful
Did you update USB submodule?
git submodule update --init
Sorry, but i don't know something about it, i starting in programmation ! So, how to do that ? :-/
Boot pin is configured for LOW to enter bootloader, I propose a change to allow the logic to be inverted from the config file.
stm32l4xx.S (as an example)
and in config.h