GithubHelp home page GithubHelp logo

nabilt / stm32f4-discovery-firmware Goto Github PK

View Code? Open in Web Editor NEW
133.0 19.0 123.0 10.31 MB

Modified STM32F4 Discovery Demo Firmware from ST compile with arm-none-eabi-gcc

C 91.46% Assembly 2.83% Batchfile 0.01% HTML 1.89% C++ 0.91% Makefile 0.05% LSL 2.85%

stm32f4-discovery-firmware's Introduction

STM32F4 Discovery Demo Firmware for arm-none-eabi-gcc

Version V1.0.1 http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f4discovery_fw.zip

From ST's documentation... The STM32F4-Discovery Board Firmware Applications Package provides ready-to-run firmware examples to support quick evaluation and development on STM32F4-Discovery board. For more information on the STM32F4-Discovery and to download the available firmware package visit www.st.com/stm32f4-discovery.

Peripheral Examples

  • ADC3_DMA
  • EXTI
  • IWDG
  • PWR_STOP
  • TIM_ComplementarySignals
  • ADC_Interleaved_DMAmode2
  • FLASH_Program
  • MEMS
  • RCC
  • TIM_PWM_Input
  • DAC_SignalsGeneration
  • FLASH_Write_Protection
  • PWR_CurrentConsumption
  • TIM_PWM_Output
  • DMA_FLASH_RAM
  • IO_Toggle
  • PWR_STANDBY
  • SysTick
  • TIM_TimeBase

Instructions


https://nabil.me/2011/10/30/using-the-stm32f4-discovery-board-in-osx-lion/

Usage

git clone https://github.com/nabilt/STM32F4-Discovery-Firmware.git
cd STM32F4-Discovery_FW_V1.0.1/Project/IO_Toggle
make && make program
openocd -f ../../openocd_config/openocd.cfg -f ../../openocd_config/stm32f4x.cfg

In another terminal

arm-none-eabi-gcc
(gdb) target extended localhost:3333
(gdb) # reset and halt the chip
(gdb) monitor halt
(gdb) # load symbol files
(gdb) file demo.elf
(gdb) # load demo.elf into RAM
(gdb) load demo.elf
Loading section .isr_vector, size 0x188 lma 0x8000000
Loading section .text, size 0xc5c lma 0x8000188
Loading section .data, size 0x38 lma 0x8000de4
Start address 0x8000d6c, load size 3612
Transfer rate: 6 KB/sec, 1204 bytes/write.
(gdb) run the program. hit Control-C to stop
(gdb) continue

stm32f4-discovery-firmware's People

Contributors

nabilt avatar

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

stm32f4-discovery-firmware's Issues

Project/Demonstration does not compile.

I'm running make in https://github.com/nabilt/STM32F4-Discovery-Firmware/tree/master/Project/Demonstration and just getting:

$ make
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork    -Os  -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DMANGUSTA_DISCOVERY -DUSE_USB_OTG_FS -DHSE_VALUE=8000000 -I./ -I./ -I../../Utilities/STM32F4-Discovery -I../../Libraries/CMSIS/ST/STM32F4xx/Include/ -I../../Libraries/CMSIS/Include/ -I../../Libraries/STM32F4xx_StdPeriph_Driver/inc/ -I../../Libraries/STM32_USB_Device_Library/Class/hid/inc -I../../Libraries/STM32_USB_Device_Library/Core/inc/ -I../../Libraries/STM32_USB_OTG_Driver/inc/  -Wl,-T,stm32_flash.ld main.c selftest.c stm32f4xx_it.c system_stm32f4xx.c usb_bsp.c usbd_desc.c usbd_usr.c ../../Utilities/STM32F4-Discovery/stm32f4_discovery.c ../../Utilities/STM32F4-Discovery/stm32f4_discovery_lis302dl.c ../../Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c ../../Libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c ../../Libraries/STM32_USB_OTG_Driver/src/usb_core.c ../../Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c ../../Libraries/STM32_USB_Device_Library/Class/hid/src/usbd_hid_core.c ../../Libraries/STM32_USB_Device_Library/Core/src/usbd_req.c ../../Libraries/STM32_USB_Device_Library/Core/src/usbd_core.c ../../Libraries/STM32_USB_Device_Library/Core/src/usbd_ioreq.c startup_stm32f4xx.s -o demo.elf
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x16): undefined reference to `_exit'
collect2: error: ld returned 1 exit status
make: *** [demo.elf] Error 1

I've installed the arm-none-eabi toolchain from:
deb http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu precise main.

Is there something else I need to do?

(Using Ubuntu 12.04LTS on x86_64.)

As the undefined reference is to _exit it could be that I'm missing the C runtime (called crt0, iirc?).

Cannot compile the code.

The code from Demonstration (actually all projects) cannot be compiled on Ubuntu 18.04.
I have already follow the steps in README.md and here is the error message:

error: /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/crt0.o: Conflicting CPU architectures 13/1
...
collect2: error: ld returned 1 exit status

Any ideas?

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.