optimization of embedded resources

josip

Joined Mar 6, 2014
67
why is it impossible to reach 200kb/sec in C?
Because compiler can't read my mind.

There is C open source of TI/Elprotronic Replicator (http://www.ti.com/lit/zip/slau320) with flashing rate 8 KB/s, without PC/flasher transfer included, because flashing file is stored in flasher. So you can use magic compiler setup and all kind of optimization to push it over 200 KB/s.

BTW, other C open source TI FET's use inlining for almost all functions, and DMA for firing data on high speed over port to target device, and still unable to go over 10 KB/s. There is no DMA and inlining in my assembler source.

You have the device to be flashed, and it will accept serial data upto some rate.

you have the USB stack, which includes latency, and has different modes, and needs a RAM buffer.

You have the software or hardware serial port, working from the RAM buffer.

I dont know the MHz rate of the device, and the RAM size, but true, if it is very limited, you can squeeze out more with assembler.

Also nothing is said about the USB stack, which mode, and how much RAM buffer it is using.

Did you replace C language USB stack with an assembler made one?
I have my own assembler USB stack (http://forum.43oh.com/topic/3931-native-usb-port-on-lm4f120-board/?p=37130), fastest and lightest AFAIK, total size (program, without RAM buffers) 1 KB. In flasher project DMA is not used, and USB buffer is 512 bytes.

Flasher is based on low cost, USB entry level, MSP430F550x, running on 24 MHz. Voltage can go down together with target voltage until 1.8V, and up to 3.6V. Current is about 10 mA. Target devices are clocked at 6 MHz. There are 3 wire connection (SBW+) between flasher and target (5, if VCC/GND is counting).

There are 3 processes totally in parallel, data transfer from PC to flasher, data transfer from flasher to target device, and flashing.
 
Top