Posted: Mon Sep 06, 2021 12:55 pm Post subject: Same .bin for XMEGA192A3U and XMEGA256A3U?
I have several devices, some using XMEGA192A3U and some using XMEGA256A3U, all of them with Bascom bootloader. Is there a way to update them without knowing which processor each one is using?
I guess this is the same as asking If I can compile a software that works with both chips given that the only difference bewteen these chips is the amount of flash (the program fits in both of them) and the amount of EEPROM (which I'm not using) and given that the Bootloader was compiled specifically for each chip.
Or more specifically, what changes should be done to a Bascom Bootloader which will be compiled for and loaded into a XMEGA192A3U chip in order for it to accept a .bin file compiled for a XMEGA256A3U and programm correctly the XMEGA192?
Regards
Héctor
PD: Chips shortage will make us do extrange things.
(BASCOM-AVR version : 2.0.8.3 , Latest : 2.0.8.4 )
Those XMegas (192 & 256) have the same amount of SRAM (16KB) so I think programs should work the same on both
If amount of SRAM differ then only programs for smaller SRAM uC should work on bigger because Hwstack is placed on the end of SRAM.
Bootloaders will place application code (bin) from address 00 so till everything fits it should work without any changes in the bootloaders I think.
When you send a 256K bin file to a 192K Flash chip, the bootloader will write to flash the first 192K which is OK, but it will keep writing blocks to inexistent flash addresses until it receives the EOT. I wonder if this will be a problem.
It will write only till the end of BIN file with alignment into 128 Bytes at the end if for example there will be only 80 Bytes (because XMODEM protocol checksum). If BIN file for XM256 will be smaller than 192KB it should fit because they have even separate flash space for bootloaders.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum