DFU optimization

More
03 Feb 2018 08:11 - 05 Feb 2018 06:56 #67376 by vlad_vy
DFU optimization was created by vlad_vy
By the way, DFU optimization used for devo7e (and F series) can save about 4K MCU flash memory for other transmitters and 8K MCU flash memory for devo7e-256 series.
Last edit: 05 Feb 2018 06:56 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
03 Feb 2018 09:56 #67378 by Fernandez
Replied by Fernandez on topic DFU optimization
Always good to be efficient....

FYI, in my devo U7E I soldered the 512k chip version (STM32F103RET6) (512kb Flash/64kb SRAM) it works fine and is full pin compatible it is not much more expensive, but I beleive the bootloader only adress and use 256k.
No idea what is in the jumpers and iranges......

Please Log in or Create an account to join the conversation.

More
05 Feb 2018 07:16 #67391 by vlad_vy
Replied by vlad_vy on topic DFU optimization
devo7e-256 without DFU optimization:

+ Building 'devo7e-256.elf'
ROM: 0x08003000 - 0x08038cac = 215.17kB
RAM: 0x20000000 - 0x200087e4 = 33.97kB


devo7e-256 with DFU optimization:

+ Building 'devo7e-256.elf'
+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x08036dfc = 207.50kB
RAM: 0x20000000 - 0x200087e4 = 33.97kB

Please Log in or Create an account to join the conversation.

More
05 Feb 2018 07:51 #67392 by FDR
Replied by FDR on topic DFU optimization
Actually what do you mean on "DFU optimization"?

Please Log in or Create an account to join the conversation.

More
05 Feb 2018 08:20 #67393 by vlad_vy
Replied by vlad_vy on topic DFU optimization
For devo7e DFU optimized around the crc 'hole'. With other transmitters code placement started after crc 'hole' (CRC is located at 0x08005000).
ifdef OPTIMIZE_DFU
	$(CP) $(TARGET).elf objs/$(TARGET)/$(TARGET).elf
	@echo " + Optimizing placement and re-linking"
	$(SDIR)/../utils/repack_ld.pl -mapfile $(TARGET).map -size $(CRC_OFFSET) > objs/optimize.ld
	$(CC) -o $< $(OBJS) $(LIBOPENCM3) $(LFLAGS) $(LFLAGS2OPT) $(CFLAGS)
endif

Please Log in or Create an account to join the conversation.

More
05 Feb 2018 08:25 #67394 by FDR
Replied by FDR on topic DFU optimization
I thought the CRC in the DFU has a fixed position...

Please Log in or Create an account to join the conversation.

More
05 Feb 2018 08:30 - 05 Feb 2018 08:40 #67396 by vlad_vy
Replied by vlad_vy on topic DFU optimization
Yes. But without DFU optimization: vector table, zero bytes up to CRC, CRC (0x08005000), code. With DFU optimization: vector table, code, CRC (0x08005000), code.
Last edit: 05 Feb 2018 08:40 by vlad_vy.

Please Log in or Create an account to join the conversation.

Time to create page: 0.031 seconds
Powered by Kunena Forum