cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery + STM32F4DIS-BB Ethernet project over 32KB

dman
Associate II
Posted on March 12, 2016 at 01:11

So I got myself a STM32F4 discovery board and the STM32F4 Expansion board to play with Ethernet, spend a descent £40-£50 on ST's products just to be told that the example projects exceed the allowed 32KB code size by the Keil linker (IAR too). Now I know its a limitation by the tool chain and not ST's fault, still pretty annoying that the only official example projects can't be used without purchasing license from Keil or IAR. 

Has anyone had any luck with getting these examples to run with the 32KB limit?

https://www.element14.com/community/docs/DOC-54872?ICID=knode-STM32F4-bboardse

Thanks
4 REPLIES 4
AvaTar
Lead
Posted on March 12, 2016 at 10:18

Alternatively, you could try a free toolchain.

Atollic has a free variant (no code size or time limit), and is supported by ST too, in the form of prepared project setups.

EmBlocks (now calls itself ''EmBitz'')  is another popular toolchain with good support for ST MCUs (and SPL code).

Posted on March 12, 2016 at 13:47

Well Keil does offer temporary licences, for students, etc. ST's examples are more tailored to professional engineers, not makers. It is probably not realistic for them to have to support several dozen tool chains, there is really no reason why niche tool chains can't load/import a project framework description from one of the main players.

The thing to watch with Keil is large static allocations (initialized memory arrays, etc) as these add to the 32KB limit, and can eat it up quickly, whereas dynamic allocations do not.

There might be more options with the Nucleo-144 series, and Cube and System Workbench.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mark239955_stm1
Associate II
Posted on March 14, 2016 at 06:15

I've successfully gotten a CubeMX LwIP project to run (with some tweakage) under Atollic on an F4Disco+BB.  The biggest problem is that the Ethernet PHY on the BB isn't directly supported by the Cube output, but it's actually pretty easy to hack something workable together because it uses the industry-standard RMII interface and register set.  Also, that PHY doesn't properly support link interrupts, so you need to set up polling of the link state and setup/teardown LwIP as necessary when the link is made/broken.

My take: Atollic is a touch ugly (being Eclipse-based) and a bit less capable (being free) than Keil, but it's very hard to argue against a product that is FREE, WORKS, and is reasonably well integrated with CubeMX.  I won't be going back to Keil, even for paid work, until they get with the program and remove their code size limit.

dman
Associate II
Posted on March 14, 2016 at 19:24

Hi guys,

Thank you for your responses. I was not aware of Atollic so will definitely check it out. I also understand that Keil and alike are for professional level users.

Thanks