Giter VIP home page Giter VIP logo

stm32-template's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stm32-template's Issues

Error when I type "make"

make: *** No rule to make target "system_stm32f10x.o", needed by "Demo.elf". Stop.

I only change paths to periph.library and to gcc.

Why it appear and how to fix it?

Make demo.elf fails

Hello, I am following along with your book "Discovering the STM32 Microcontroller". On page 49 there is instruction to type "make" in the demo folder. The stm32f10x.h file cannot be found despite Makefile.common pointing to the right place. I even checked by navigating to the location and looking at the file!

This is the error from make:


~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc -c -O1 -g -mcpu=cortex-m3 -mthumb  -I.. 
-I/gcc-arm-none-eabi_samples/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x 
-I/gcc-arm-none-eabi_samples/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport 
-I/gcc-arm-none-eabi_samples/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc 
-I. -DSTM32F10X_MD_VL  -DUSE_STDPERIPH_DRIVER -DUSE_FULL_ASSERT  
-I../Library/ff9/src -I../Library ../startup_stm32f10x.c -o startup_stm32f10x.o

../startup_stm32f10x.c:3:23: fatal error: stm32f10x.h: No such file or directory
compilation terminated.
make: *** [../Makefile.common:66: startup_stm32f10x.o] Error 1

Please could you send help, I would like to carry on with this book.

I can see the first linked library is "-I.." could that be where the problem lies? I will carry on looking at the files and wait for your reply.

Exercise 4.1 does not compile - undefined reference to `assert_failed'

Hi,
I was working my way through your book and hoping to learn how to program STM32s using the gcc tool chain. Turns out my geekyness is not high enough... Trying to compile the modified blinky from exercise 4.1 throws a lot of "undefined reference to assert_failed" from STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c

I've downloaded the library from STM just yesterday. I found two suggested 'fixes' for that, none of them made it compile.

Helpless,
Stephan

Error in make

when typed "make" ... ends to this:

/home/peyman/toolchain/Sourcery/bin/arm-none-eabi-gcc -T../stm32f100.ld -mthumb -mcpu=cortex-m3 -o BlinkingLights.elf startup_stm32f10x.o system_stm32f10x.o main.o
main.o: In function main': **# /home/peyman/toolchain/STM32-Template/BlinkingLights/main.c:12: undefined reference to RCC_APB2PeriphClockCmd'**
collect2: error: ld returned 1 exit status
../Makefile.common:61: recipe for target 'BlinkingLights.elf' failed

I think marked text says that could not include "stm32f10x_gpio.c" & "stm32f10x_rcc.c" files in "/home/peyman/toolchain/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver" directory.
How to fix??

the stm32l discovery board

Hello.
I didn't find a "send a message" button so I'm creating an "issue".
I'm currently studying your STM32 book and bought (a while ago) an stm32ldiscovery board as opposed to stm32vldiscovery board.
What do you think should I do: will it be better for me to try to adopt your template for my stm32l microprocessor or should I order an stm32vldiscovery?

Adding a CMakeLists.txt

Hello!
I have a CMakeLists.txt version of the Makefile and Makefile.common and I think it'd be a good idea to add it, some of my reasons are:

  1. A decent amount of people use IDEs for their projects, sure, Makefiles work well enough with IDEs but not always
    • And even if they don't use IDEs, a CMakeLists.txt does make life easier for debugging and suggestions/completions
  2. I think a CMakeLists.txt that can be used as a template is in line with what is taught/learned through the Discovering STM32 book
  3. And it gives the user freedom of choice!

Now, some details regarding the CMakeLists.txt file I have been using:

  • It is a single file that simulates both the Makefile and the Makefile.common, I am open to changing it from 1 file to 2 files that are closer to the current Makefile layout if it's truly wanted/needed
  • There are modifications that I know I'd have to make so its more of a template, namely:
    • Lines 14 to 16 which just link the library directly, instead I would add the LIBROOT so it matches the Makefile.common
    • Adding TOOLROOT as well since my compiler is available in the search path and installed system-wide but that is not the case for everyone
    • Organize the file a bit more since I was jumping between looking at what the Makefile and Makefile.common did and modifying or adding things as I needed them
    • As you can see on lines 29 to 35 we have to manually add the files, I would add variables so we shorten this
      • Example: ${PERIPH_SRC}/stm32f10x_gpio.c
      • Obviously the naming convention is up for discussion haha

Excited to hear what you think about this idea!

Yet another Make error

Hello,

I'm using windows 7 and GNU ARM Embedded Toolchain from launch pad, and peripheral lib v3.5
I'm getting the following error.

D:\STM32\STM32-Template\Demo>make C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin\arm-none-eabi-gcc -c -O1 -g -mcpu=cortex-m3 -mthumb -I.. -ID:\STM32\STM32F10x_StdPeriph_Lib_V3.5.0 \Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x -ID:\STM32\STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\CoreSupport -ID:\STM32\STM32F10x_StdPeriph_Lib_V3. 5.0\Libraries\STM32F10x_StdPeriph_Driver\inc -I. -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DUSE_FULL_ASSERT -I..\Library\ff9\src -I..\Library ../startup_stm32 f10x.c -o startup_stm32f10x.o /usr/bin/sh: -c: line 1: syntax error near unexpected token '(x' /usr/bin/sh: -c: line 1: 'C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin\arm-none-eabi-gcc -c -O1 -g -mcpu=cortex-m3 -mthumb -I.. -ID:\STM32\STM3 2F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x -ID:\STM32\STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\CoreSupport -ID:\STM32\S TM32F10x_StdPeriph_Lib_V3.5.0\Libraries\STM32F10x_StdPeriph_Driver\inc -I. -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DUSE_FULL_ASSERT -I..\Library\ff9\src -I. .\Library ../startup_stm32f10x.c -o startup_stm32f10x.o' make: *** [startup_stm32f10x.o] Error 258

It seems that there is a syntax error in startup_stm32f10x.c but I haven't edited it.
Please advise.

Thank you.

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.