Comments (14)
It's easy. You needs
- CMSISV4 or CMSISV5 from ARM
- Hardware definition includes for your MCU. Can be obtained from ST as a part of the Stcube. It must be placed into corresponded folder of CMSIS
- stm32.h
- Set environmental variable CMSIS to point to CMSIS root folder.
Somepath/Cmsis root <--- CMSIS root. Point CMSIS envar here.
+-CMSIS <--- generic CMSIS from ARM
+-Device
+-ST <--- ST Vendor folder
+-STM32F0xx
+-STM32L0xx
+- stm32.h
from sboot_stm32.
Also pin pulldown must be configured.
from sboot_stm32.
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.
from sboot_stm32.
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
from sboot_stm32.
I've created a pull request with this functionality:
from sboot_stm32.
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.
from sboot_stm32.
Ok, cool, I will use this and will pull in the changes and disregard mine for the pullup/down configuration. Many thanks for this
from sboot_stm32.
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
#include "stm32.h"
^
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
from sboot_stm32.
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
from sboot_stm32.
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 👍
from sboot_stm32.
Hi. Sorry for the late reply.
There is some options to do this:
- Via system environmental variables. It's a preferred way for me.
- pass CMSIS to mingw32-make.
mingw32-make CMSIS='C:/path/to/the/cmsis/root' target_to_make
- modify line 5 in the project makefile.
CMSIS ?= $(abspath ../CMSIS) -> CMSIS ?= 'C:/path/to/the/cmsis/root'
PS. Not sure about using quotes under Win.
from sboot_stm32.
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
from sboot_stm32.
Did you update USB submodule?
git submodule update --init
from sboot_stm32.
Sorry, but i don't know something about it, i starting in programmation ! So, how to do that ? :-/
from sboot_stm32.
Related Issues (20)
- Build fails with linker errors HOT 2
- Unable programm if rdp>0 HOT 14
- Generating empty elf in openstm32 - system workbench HOT 1
- Error "sorry - this program has been built without plugin support" HOT 9
- User firmware stuck or not starting after reset. HOT 5
- Firmware stuck at start when using MX_USB_DEVICE_Init(); in user firmware. HOT 5
- Compiling bootloader for stm32f103x8 HOT 1
- User code in bootloader HOT 6
- Multiple Memory Overflow Vulnerabilities In dfu_control HOT 3
- Supports STM32F103xC/D/E devices with 2Kbytes pages HOT 1
- Support for STM32H7 family HOT 1
- README.md spell correction
- Use HSI48+CRS on L0 HOT 5
- Checksum documentation HOT 4
- Clear FLASH_SR in stm32f0xx.S HOT 1
- Compilation with -Werror HOT 2
- Timeout for inactivity. HOT 3
- Support multiple DFU transports? USART? HOT 2
- Need a checksum only feature in fwcrypt HOT 2
- stm32g491 support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sboot_stm32.