Switch to full style
Libraries, utilities, bootloaders...
Post a reply

Alternative experimental bootloader by Jonnection, version 2

Thu Jul 31, 2014 8:10 pm

Hello all

As promised, here is yet a bit more improved version of the bootloader I started making for Fakebuinos. If you know how to flash the bootloader, you are most welcome to try it out on your Gamebuino as well. Please note this is not an official bootloader approved by Rodot. SO USE AT YOUR OWN RISK ! You can not damage the Gamebuino/fakebuino, but you need to know how to replace the original bootloader.

I'd appreciate if the people interested (problems with bootloader hangs) would try this bootloader (albertinjo, treflip etc).

Some changes to the official Gamebuino bootloader:

1. It uses the adaboot mod to detect cause of reset from MCUSR. It will not flash the loader.hex if the cause of reset is "soft" reset. Even if you hold the C button forever, it will flash loader.hex only 1 time.

2. It checks C button 3 times with delays in between (ie. debounce). It will NOT flash the loader.hex because of power on / off cycle anymore. You can switch on and off as much as you like, as long as you do not hold C.

3. You need to hold C, reset device and then count to three before releasing C to launch the loader. You can not hold too long by accident (see point 1) but this is a good rule of thumb.

4. I switched flash_write routines from _short versions to _normal versions. Although they use a little bit more space, they might be a bit more robust. I'm trying to improve the stability of the bootloader / loader.

I have tested this and so far I have not been able to crash it even once. Please try it and tell me your results.

Source in the .7z file attachment
USE THE HEX in the google drive link, the hex in the 7z is the old version !!!

https://drive.google.com/file/d/0BweEjvtKj1KLMnMxNHFlSnZYN2s/edit?usp=sharing
Attachments
gamebuino_boot.7z
(35.71 KiB) Downloaded 1018 times
Last edited by jonnection on Thu Jul 31, 2014 9:34 pm, edited 1 time in total.

Re: Alternative experimental bootloader by Jonnection, versi

Thu Jul 31, 2014 9:20 pm

Great, we're going to ave the best bootloader ever, even better that the official Arduino bootloader :D

jonnection wrote:It will not flash the loader.hex if the cause of reset is "soft" reset.

Then when you select a game to flash in LOADER.HEX you'll have to power cycle your Gamebuino, if it doesn't flash the games on a soft reset?

jonnection wrote:It will NOT flash the loader.hex because of power on / off cycle anymore.

Heee it's already not supposed to do that if you don't hold C down when you turn it back on :?

Are the addresses to load a game or to write a page memory still the same?
Code:
#define load_game (*((void(*)(const char* filename))(0x7ffc/2)))
#define write_flash_page (*((void(*)(const char * page, unsigned char * buffer))(0x7ffa/2)))

Re: Alternative experimental bootloader by Jonnection, versi

Thu Jul 31, 2014 9:43 pm

1. Soft reset. I checked this just now. Load_game first uses load_file in mmc_fat.c to write program and only after that it reboots. Launc loader on soft reset is actually never needed!

2. Flash on power cycle. Was error on my first version on fakebuinos.

3. Prog jumps. They are intact, no changes.
Last edited by jonnection on Thu Jul 31, 2014 9:59 pm, edited 1 time in total.

Re: Alternative experimental bootloader by Jonnection, versi

Thu Jul 31, 2014 9:58 pm

Thanks for the answers :)

Re: Alternative experimental bootloader by Jonnection, versi

Thu Jul 31, 2014 10:00 pm

Please see my edit about soft reset. I thought i made a mistake but it was not so.

Re: Alternative experimental bootloader by Jonnection, versi

Thu Jul 31, 2014 10:04 pm

Thanks again for the answer ^^
That sounds really great. I'll give it a try asap :)

Re: Alternative experimental bootloader by Jonnection, versi

Sat Aug 02, 2014 8:46 am

Hi jonnection, I havent got much time right now, but I am going to test yout bootloader soon. The last version worked fine, but it was glitching on my DIY gamebuino v1.0 because of my bad connections (it is built on a proto-board). I am going to breadboard another gamebuino and test your bootloader, I was thinking of making my custom PCB for the gamebuino... just like you did.
Thanks for the great help!

Re: Alternative experimental bootloader by Jonnection, versi

Mon Aug 04, 2014 9:36 am

Take a look at this video I made:

Re: Alternative experimental bootloader by Jonnection, versi

Mon Aug 04, 2014 1:45 pm

Hi Albertinjo

Very nice and thorough video, well done.

Now, the question that interests me is ... are you using my 'modded' bootloader in the video ? If so, any crashes ?

By the way, I have now a 25W speaker in my "fakebuino" ... I'll have to make a video of it for you to see ;-)

WBR,
Jonne

Re: Alternative experimental bootloader by Jonnection, versi

Tue Aug 05, 2014 9:54 am

Hi Jonne,
Yes, the bootloader I am using in my video is your "Bugfixed bootloader" v1.0, I am describing it a bit more at the end of the video.(I thanked you at the end of the video)

I havent tried your "Bugfixed bootloader" v2.0 yet...
About the crashes, your bugfixed bootloader v1.0 works great and i suppose the v2.0 bootloader works even better. But my DIY gamebuino v1.0 is soldered on a proto-board, and my bad connections interfere with SPI communication with the SD card.
My SD card slot is just connected with wires to the board, and the SD card slot is taped to the 1000mAh Li-Po battery.

On the new gamebuino I am making (DIY gamebuio v2.0) I am going to add a MicroSD slot which will be directly soldered to the proto board. That will eliminate the SPI communication glitching.

25W speaker, isnt that a bit too big, or you meant 0.25W speaker :lol:

Anyway, thanks!
Post a reply