Giter Club home page Giter Club logo

Comments (14)

dmitrystu avatar dmitrystu commented on June 10, 2024 1

It's easy. You needs

  1. CMSISV4 or CMSISV5 from ARM
  2. 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
  3. stm32.h
  4. 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.

dmitrystu avatar dmitrystu commented on June 10, 2024

Also pin pulldown must be configured.

from sboot_stm32.

sn00pster avatar sn00pster commented on June 10, 2024

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.

dmitrystu avatar dmitrystu commented on June 10, 2024

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.

sn00pster avatar sn00pster commented on June 10, 2024

I've created a pull request with this functionality:

#7

from sboot_stm32.

dmitrystu avatar dmitrystu commented on June 10, 2024

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.

sn00pster avatar sn00pster commented on June 10, 2024

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.

sorokolokarim avatar sorokolokarim commented on June 10, 2024

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.

sorokolokarim avatar sorokolokarim commented on June 10, 2024

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.

sorokolokarim avatar sorokolokarim commented on June 10, 2024

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.

dmitrystu avatar dmitrystu commented on June 10, 2024

Hi. Sorry for the late reply.
There is some options to do this:

  1. Via system environmental variables. It's a preferred way for me.
  2. pass CMSIS to mingw32-make. mingw32-make CMSIS='C:/path/to/the/cmsis/root' target_to_make
  3. 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.

sorokolokarim avatar sorokolokarim commented on June 10, 2024

Hello !!! Thank you for your kindness ! I have done all you told to me, but i have error :-/
CMSIS_5

CMSIS0

CMSIS1

CMSIS2

Variable env0

Variable env1

Makefile

I want to build a bootloader for stm32f103c8x6, when i run "make stm32f103x8", i have this :

Error usb

thank you very match for your helpful

from sboot_stm32.

dmitrystu avatar dmitrystu commented on June 10, 2024

Did you update USB submodule?
git submodule update --init

from sboot_stm32.

sorokolokarim avatar sorokolokarim commented on June 10, 2024

Sorry, but i don't know something about it, i starting in programmation ! So, how to do that ? :-/

from sboot_stm32.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.