It is absolutely impossible to re-implement features like what the Linux stack has from scratch with bare-metal style software
my point precisely -- it never works without hick-ups.
Chris Ponder said:
Does this mena I should be looking at a commercial IP stack?
The i.MX53 wont be used on the faster devices, we will use the i.MX6 single core equivalent which does have Gb Ethernet, hopefully not too big a step in terms of software.
for your needs i would recommend to look for commercial solution -- IP+RTOS. Even fastest and best performing IP stack will fail with lousy RTOS integration. FreeRTOS is good and light, but there are better ones too. You need to look for something that will support both CortexA8 and A9 cores, with all device drivers and features you need; also make sure that the vendor will provide plenty of support. Having someone with local engineers is huge benefit. With your goals you will spend a lot of time on application design and system integration; so you don't need to spend even more for RTOS/IP porting, debugging, bug fixing... etc.
if you are talking about 1gbps ethernet with 99% throughput you actually need highly specialized ip stack and drivers, zero copy drivers and stack, no latency FIQ based interrupts, carefully planned memory layout and DMA utilization -- based on my experience lwIP is getting messy when it comes to high throughput, low latency requirements. LSO/LRO support is a must (not implemented in lwIP)! Also there is a concern that superjumbo packets may not even fit in internal sram -- those can get till 64000 bytes, and you have 128kb sram for everything.
Personally, I would think twice to choose iMX53 for high speed gigaethernet design... there are specialized network processors out there that are optimized for such task. iMX53 is multimedia processor, and it's good at it.
P.S. i do have experience of designing high performance network devices for up to 10gbps throughput.
P.P.S. you do realize, that you will need external FEC/MDI -- iMX53 has only 10/100...
in that case it is understandable. But you will need to make highly educated decision about IP stack! lwIP will not be sufficient for most tasks, and better IP stacks will eat more memory, both code and data.
Chris, after looking on your replies, why do you need i.MX53 then? there are cheap cortex-m4 devices with network, plenty of flash/ram and ready freertos port (k60 for example).
And to answer your question -- yes, FreeRTOS runs as my recovery bootloader.
Ok, then you won't have any other choice. However, good luck with fighting against the complexity of the chip :-)
rsc
Hi Chris,
Can you elaborate the reasons why you want to run bare metal software on MX53? Note that Linux runs nicely, and if you like, you can get preempt-rt support as well. So taken the complexity behind a machine in the MX53 league, I wouldn't start with bare metal.
Best regards,
Robert
well, the questions, you're asking, are same for everyone starting new port, so they are not dumb. As for time -- it took about 8 hours with debugging to get perfectly running port. Another 14 hours to get EHCI,FatFS and lwIP added.
It all depends on goals -- i set to this adventure instead of linux, due to need of recovery bootloader, that will understand USB MSD and USB ethernet adapter, and fit in 65k i2c eeprom. After messing for over 2 months with u-boot, i gave up, and wrote my own tiny bootloader, that actually fits in 32k =) -- goal achieved. But my main system application is in linux.
Why did you choose to go bare metal route?
P.S. portasm.S is one of the files to be ported to A8... i've used http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.... as my reference for porting.