element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
STM32F4DISCOVERY Expansion Boards
  • Products
  • Dev Tools
  • STM32F4DISCOVERY Expansion Boards
  • More
  • Cancel
STM32F4DISCOVERY Expansion Boards
Forum STM32F4 Discovery open-source development software
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join STM32F4DISCOVERY Expansion Boards to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 7 subscribers
  • Views 1394 views
  • Users 0 members are here
  • gcc
  • stm32-discovery
  • stm32f4dis_software_examples
Related

STM32F4 Discovery open-source development software

Former Member
Former Member over 12 years ago

I don't know if ST are planning to offer support for the open source GNU toolchain for STM32 (as used by Raisonance RIDE7), as they do for other products.  But it can be made to work if you are prepared to hack your own makefiles and linker scripts.  I just got the LCD, Touchscreen and Ethernet examples running, built on my Ubuntu Linux workstation with the arm-none-eabi-gcc toolchain and the openocd debugger (yes, openocd does support SWD, and they are even available on Windows).  I won't say it was instant, it took a week or so of learning curve, but I didn't have to part with any hard-earned cash. I even got the Discovery board set 'free' under the Power Circuit rewards scheme after my last project.

 

Once I'd found all the files and got the typos out of the scripts, it did what it says on the tin ( and no crippleware size limits to worry about).

 

It would be a shame if such a wonderfully low-cost development system lost its potential to lower the entry bar for designers by restricting it to $1000-plus software systems.  Allright for those that already have them: a few years ago I coughed up for a development system for the uPSD series, only to find their FS USB was seriously buggy, and to have ST pull the plug the following year.  So I'm naturally cautious.

 

Me, I'm looking forward to designing some ethernet-enabled instruments.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 12 years ago

    Hi Tim,

    I'm interested in what you have done here with the open source toolchain.

    I'll be working on getting it all going with CoIDE and gcc-arm-none-eabi-4_7 (as soon as I get some free time) so any pointers you may have would be very helpfull.

    I've got an application in mind for driving Variable Message Signs and need to get the ethernet interface working along with the GLCD and touch screen.

    Regards,

    Dean.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 12 years ago in reply to Former Member

    I've posted this a few times. Here is a great resource for getting STM32 dev going under linux. And he's got great examples.

     

     

    http://www.cs.indiana.edu/~geobrown/book.pdf

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to mconners

    Yes, a very useful training resource, gives helpful examples of makefiles, linker scripts etc, but it is based on the Discovery VL board so doesn't cover ethernet, USB, fpu or other features of the STM32F4 Discovery kit, or the ramifications of using the ST supplied code and examples with gcc. Software developers might find his concentration on hardware hacking a bit daunting, but fear not, the F4 kit is a lot more of a 'plug and play' system than the VL or L1 boards.

     

    The great thing about the STM32F4 Discovery kit is that you can get a project started very quickly using or adapting the supplied building bricks without having to delve too far into the details of the hardware, but still having access all the way to bare metal.  You only have to hack the bits you are interested in using, which takes a lot of the steepness out of the traditional development system learning curve.  With a 1300 page hardware reference manual, 250 page programming manual and 180 page data sheet to learn just for the chip itself, we need all the help we can get.

     

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 12 years ago in reply to mconners

    Yes, a very useful training resource, gives helpful examples of makefiles, linker scripts etc, but it is based on the Discovery VL board so doesn't cover ethernet, USB, fpu or other features of the STM32F4 Discovery kit, or the ramifications of using the ST supplied code and examples with gcc. Software developers might find his concentration on hardware hacking a bit daunting, but fear not, the F4 kit is a lot more of a 'plug and play' system than the VL or L1 boards.

     

    The great thing about the STM32F4 Discovery kit is that you can get a project started very quickly using or adapting the supplied building bricks without having to delve too far into the details of the hardware, but still having access all the way to bare metal.  You only have to hack the bits you are interested in using, which takes a lot of the steepness out of the traditional development system learning curve.  With a 1300 page hardware reference manual, 250 page programming manual and 180 page data sheet to learn just for the chip itself, we need all the help we can get.

     

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • ChuckMcM
    ChuckMcM over 12 years ago in reply to Former Member

    Running on Ubuntu 12.04 ...

     

    So far I've built the summon tool chain (pretty straightforward) git clone the repo, cd to it and run the script.

     

    This puts all of the tools you need in ~/sat/bin which you can set your tool root too.

     

    The challenge for building bare metal code is that you need a linker script, some initial startup code and the register definitions.

    I pulled the stm32f4xx.h file from the ST distribution. I modified the startup_stm32f4xx.s to pull out everything I didn't really need

    and then set up the system clock in my code. It can complile, link, and create a .hex file which the ST tools will flash on the board.

     

    I've got OpenOCD but for reasons that are a bit mysterious, Virtualbox won't let me connect the ST-Link to the my running instance

    of Ubuntu. I'll be able to figure that out once I move to a full on system (currently hosting a virtual environment so that I can use windows

    to run the STLink software from ST, thus minimizing the number of problems to solve at once.)

     

    My goal is to have a very clean, open source only toolchain, setup so that I can build code for this chip reliably. Then I'll add the Atmel SAM4 series.

     

    --Chuck

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube