
Dear Jon Smirl,
In message 9e4733910903260647w549a97acv7101ea9347a767bb@mail.gmail.com you wrote:
My networking hardware needs microcode loaded into it before it will function. What's the best method to load this code? It's 70KB.
My current u-boot image is 170KB. I started working with the code in examples and api_examples. But the "hello world" programs built using those APIs are 65-72KB in size. That's almost half the size of my u-boot image and these programs just print "hello world". Why are these programs so big? My goal was to put the loader program and my microcode into a single 128KB erase block.
My code for loading the microcode into the hardware is 7KB. Now it looks like I will need to incorporate it into the main u-boot image instead of making it an external command.
I'm not sure how you calcualte sizes, or how you link your applications. Note that classical standalone application do not link against any libraries, so they are really small:
-> size examples/{hello_world,timer} text data bss dec hex filename 796 40 0 836 344 examples/hello_world 1556 56 0 1612 64c examples/timer
As you can see, the "hello world" demo program just needs a few hundret bytes.
Best regards,
Wolfgang Denk