[quote:791afa9dca="njepsen"]to mean "is not useful any more", not that it wouldnt work at all.[/quote:791afa9dca] Your interpretation hangs very much to the side where you want to have it
The 'wouldn't work' results out of its purpose: [quote:791afa9dca]Instruct the compiler to generate a hex/bin file that starts at the specified address.[/quote:791afa9dca] In an AVR it wouldn't help if your hexfile starts at a flash address different to the start address. Additionally this command very much sounds like it has global impact, means as soon it's in the code, it will affect the complete code, it will not only affect the hexfile's address beginning from the line where it is located.
This approach seem to have worked in 2015, as in https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=12372 But since then the compiler had a few steps in version, and as it wasn't a guaranteed functionality by then, it may have vanished somehow by now.
It may however be useful for producing series, where virgin controllers can be outfitted with code and bootloader in one step. I would suggest a special command/compiler directive for this purpose, which places any code following this command to the specified address. Bascom core code needs to be in front of this specified address.
Does anyone have information on how much longer Microchip will continue the AVR series uPs? I am about to start a new project, using an Xmega, and of course BASCOM. My concern is how long I can count of the availability of the Xmega devices. My project could last 5-6 years, and I prefer not to have to do a redesign mid-production if it can be avoided. Thank you in advance for your comments.
[b:b02ce7a4b2][color=red:b02ce7a4b2](BASCOM-AVR version : 126.96.36.199 )[/b:b02ce7a4b2][/color:b02ce7a4b2]
Hi MWS, No I didnt miss the Yellow triangle etc, but I interpreted [quote:cb8a1cb5dc]In the AVR it does not have any meaning.[/quote:cb8a1cb5dc] to mean "is not useful any more", not that it wouldnt work at all. Anyway - it obviously does something but I dont know what. .
All that aside - I have spent another several more hours trying to get the bootloader installed automatically with my code installation, and I'm afraid i have not succeeded. I have a bootloader that works perfectly, but when i try to install it with $loader, it says [quote Program will overwrite flash memory(or bootloader)[8944 too long), in file .... EDC - I've tried the $loader and $inc commands inside the code, before the code and after the end instruction, with .bin and .bas, with 188.8.131.52 and with 184.108.40.206 and no success.
Hello everyone. I was trying to use the Keyes encoder and it really didn't work well with the ENCODER function, I did a small routine in interruptions per level that left me very satisfied. I leave them in case someone can be useful. Regards
I think problem here is that you attach bootloader BEFORE "END" command so compiler will consider it like some code of main application and then AFTER END it will put rest of declared subs or core procedures for clearing SRAM etc...
I attach bootloader in the way you can look and then compare generated bin files. Everything looks perfectly fine. Bootlader is attached without any overhead. It starts and ends with exactly same values at the correct address 1FC00/2=F800
So move your attachment AFTER END command and then try
[quote:bbe5fa39f6="njepsen"]Just did some testing and I cant get $ROMSTART to do anything with ver 220.127.116.11 and the atmega1284p. So I'm either doing something stupid, or it doesnt work with my chip/compiler?[/quote:bbe5fa39f6] You missed an exclamation mark, yellow triangle and [b:bbe5fa39f6]The $ROMSTART directive is an inheritance from BASCOM-8051. In the AVR it does not have any meaning.[/b:bbe5fa39f6] altogether. AFAICS there is no clean way to make this work without modified compiler. As well as I did actually manage it to place the bootloader at &hF000 via !.org, the compiler adds core code after, which obviously will give problems with real and extensive code.
Thanks Guys. I have been using a bootloader for several yrs now, but thought it would be nice to be able to load it when I program the chips, rather than do it separately.
I've just read the help for $loader in ver 18.104.22.168, and now i'm totally confused, but it looks like you can use $loader to load your own BL. I just haven't figured out how. It would be nice if $ROMSTART worked with my processor,- because I should be able to use that to load my BL at the right place - but it appears not to work. I'll do dome more testing shortly. The help for $romstart says "there is no practical useage" but its not clear if it works or not.
As a work around why not load your bootloader into a blank chip and then use the bootloader to load your programme. Once you have done that you can then save the flash contents (programme and bootloader) and use that to programme further blanks.