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 1401 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

    I hust got OpenOCD running on the STM32L discovery board as well.  There is a bug in the stm32lx.cfg driver.  My Discovery board has a C-suffix (256k) chip. For this and larger chips, the Flash Size parameter (F_SIZE) is moved from 0x1FF8004C to 0x1FF800CC, and OpenOCD has yet to catch up.  As a workround you can either patch the script or patch the driver (src/flash/nor/stm32lx.c) and rebuild. The config line required is

    flash bank $_FLASHNAME stm32lx 0x08000000 0x00040000 0 0 $_TARGETNAME

    Also it struggles to connect, talking to the debug port while the processor is running seems to cause problems, I always have to halt the processor before loading else I get errors (this appleis to the F4 as well as the L).  Sometimes it won't connect unless I hold down the reset button while OpenOCD reads the parameters.

     

    Tim

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

    I hust got OpenOCD running on the STM32L discovery board as well.  There is a bug in the stm32lx.cfg driver.  My Discovery board has a C-suffix (256k) chip. For this and larger chips, the Flash Size parameter (F_SIZE) is moved from 0x1FF8004C to 0x1FF800CC, and OpenOCD has yet to catch up.  As a workround you can either patch the script or patch the driver (src/flash/nor/stm32lx.c) and rebuild. The config line required is

    flash bank $_FLASHNAME stm32lx 0x08000000 0x00040000 0 0 $_TARGETNAME

    Also it struggles to connect, talking to the debug port while the processor is running seems to cause problems, I always have to halt the processor before loading else I get errors (this appleis to the F4 as well as the L).  Sometimes it won't connect unless I hold down the reset button while OpenOCD reads the parameters.

     

    Tim

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

    Glad you got it working Tim! I'm doing things a bit differently, I've got a Black Magic Mini (http://www.blacksphere.co.nz/main/blackmagic) which basically has GDB inside of it, so you (in theory, the test will be wednesday when my cable arrives) attach this to the SWD lines, connect the USB port to your machine, poof! it shows up as a serial port, you start up GDB and connect to it. From that point on you just load in the software to test and go.

     

    I put up my simple blink script (https://github.com/ChuckM/minimal-blink) but have switched to using libopencm3 as a base. Currently working on FSMC support (its not in the library yet so I'm adding my take on it) and then to get the LCD running (which uses the FSMC to interface). Currently things hang in the FSMC setup stuff so that will be my next debugging step.

     

    At some point I hope to have a simple LCD graphics library for this thing too.

    --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