Skip to main content
jlchoobs
Associate III
May 31, 2012
Question

Why would code work when compiled with Atollic - but not with Code Sourcery ??

  • May 31, 2012
  • 42 replies
  • 5679 views
Posted on May 31, 2012 at 20:16

I successfully compiled the stm3240g Sample Project using Code Sourcery.

But, it does nothing on the Discovery Board.

But, this code is directly converted from as WORKING Code on the Discovery Board

- when compiled with Atollic Compiler.

-> Why should the Code not run successfully if it compiles by the Code Sourcery too ??

What could cause this problem - difference ?

Would WinArm work any better ?
    This topic has been closed for replies.

    42 replies

    Tesla DeLorean
    Guru
    June 15, 2012
    Posted on June 15, 2012 at 21:20

    I did a quick port of the STM322XG_EVAL to my board this morning. Had to mod the LEDs and Card Detect pin assignments, and stripped out the LCD stuff. It is successfully accessing a 2GB SD card.

    Tools :

    Yagarto MAKE 3.81

    Yagarto GNU/GCC 4.6.2

    STM32 USB Library, which actually contains a newer version of the FW library.

    As for general development, commercially we have ARM Realview for the older ARM9 SoC designs, Keil for some STR7, STR9, and STM32 work. I also have an older Rowley seat (1.6 or 1.7)  for a design that used STR7 and the vendor wanted that. For MIPS and SPARC SoC I've used GNU/GCC, being cheap and vendor supported.

    I've got some ATMEL ARM9 stuff that builds with older WinARM (GNU 4.0 or 4.3), and some STM32F1 and F2 (M3) that will work with that too. Yagarto 4.6.2 seems to be the way to go for Cortex-M4, I could probably fight that back to some other versions.

    I don't have a problem using any particular tool chain and OS, the trick is often to use one that is contemporaneous to the source code being compiled, and not to mix-and-match different versions, or ABI models. I have to build kernels in Linux, but most everything I'd prefer to use Windows, if for no other reason that I have a large arsenal of tools I can bring to bear.

    I haven't looked at the SD speed, the things aren't terrible rapid.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    June 25, 2012
    Posted on June 25, 2012 at 20:27

    The speed is mostly limited by the 12 Mbps USB Full Speed rate. It will also be impacted by the Class of SDHC card. There can be some significant performance difference between cards claiming to be 4, 6, and 10, and sequential and random access.

    Project source has been posted here

    [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Where is the UsbMassStorage Examples Supt for stm32f4xx&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx&currentviews=249]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fWhere%20is%20the%20UsbMassStorage%20Examples%20%20Supt%20for%20stm32f4xx&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https%3A%2F%2Fmy.st.com%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FAllItems.aspx¤tviews=249

    https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Attachments/23167/stm32f4_discovery_msc_sdhc_release_1.zip

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..