[Logo] Anarduino and HopeRF Community Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics     [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Lowpowerlab Dual Optiboot  XML
Forum Index » Anarduino
Author Message
mirmit



Joined: 05/11/2014 09:48:22
Messages: 8
Offline

When compiling the bootloader, you get an output like:

In this case, the size is 1954, even if the hex file is 5541 bytes long
rdww60



Joined: 05/01/2015 15:30:30
Messages: 4
Offline

mirmit wrote:Hi,

I've published my port of DualOptiboot onto OptiBoot v6.

The code is accessible at https://github.com/abouillot/DualOptiboot6.

Other changes in the support libraries are the Flash Erasing, to be made by 4K pages, as Spanion chip doesn't support 32K block erase.

Be sure to adjust the low fuse to DE, instead of default FF for most arduino boards, to correctly flash after reboot.

The code still needs optimisation, especially on size side


Hi mirmit,
I am trying to do the same in that I would like to be able to re-program the bootloader in Anarduino MiniWireless like lowpowerlab Moteino/MoteinoMega.
I'm doing this in Windows.
I see this post is quite a bit older than the latest update you have to GitHub.
I pulled a copy of your library and added the #define ANARDUINO 1 for Anarduino MiniWireless.
I downloaded IDE 1.5.6r2 as it is the last with the \hardware\tools\avr\utils folder with make in it.
I can build omake.bat miniwireless no problem.
When I use omake.bat miniwireless_isp using same com port I have issues. Prior to running,
* I have updated boards.txt,
* Loaded up an UNO with ArduinoISP sketch,
* Placed pull-ups on target for Reset, D5 & D10 (RGM69HW radio on miniwireless)
* Programmer Arduino as ISP
* Selected Anarduino MiniWireless from Boards menu

What I get, is a verification error at 0x7800.
I get this on multiple parts.
It looks like I've bricked one already trying this.
I thought I'd check with you before going further, and verify that you in fact were able to make this work on an Andarduino MiniWireless, and able to re-program over the air. Is this true?
Maybe you see a step I'm missing?

Thanks for your time and help..
w1ll14m



Joined: 03/10/2014 07:24:02
Messages: 21
Offline

rdww60 wrote:
mirmit wrote:Hi,

I've published my port of DualOptiboot onto OptiBoot v6.

The code is accessible at https://github.com/abouillot/DualOptiboot6.

Other changes in the support libraries are the Flash Erasing, to be made by 4K pages, as Spanion chip doesn't support 32K block erase.

Be sure to adjust the low fuse to DE, instead of default FF for most arduino boards, to correctly flash after reboot.

The code still needs optimisation, especially on size side


Hi mirmit,
I am trying to do the same in that I would like to be able to re-program the bootloader in Anarduino MiniWireless like lowpowerlab Moteino/MoteinoMega.
I'm doing this in Windows.
I see this post is quite a bit older than the latest update you have to GitHub.
I pulled a copy of your library and added the #define ANARDUINO 1 for Anarduino MiniWireless.
I downloaded IDE 1.5.6r2 as it is the last with the \hardware\tools\avr\utils folder with make in it.
I can build omake.bat miniwireless no problem.
When I use omake.bat miniwireless_isp using same com port I have issues. Prior to running,
* I have updated boards.txt,
* Loaded up an UNO with ArduinoISP sketch,
* Placed pull-ups on target for Reset, D5 & D10 (RGM69HW radio on miniwireless)
* Programmer Arduino as ISP
* Selected Anarduino MiniWireless from Boards menu

What I get, is a verification error at 0x7800.
I get this on multiple parts.
It looks like I've bricked one already trying this.
I thought I'd check with you before going further, and verify that you in fact were able to make this work on an Andarduino MiniWireless, and able to re-program over the air. Is this true?
Maybe you see a step I'm missing?

Thanks for your time and help..


It's been a while since I last used my arduino as ISP to program the miniwireless boards. I also killed one or two boards with experimenting. Arduino as ISP is very unreliable so I decided to buy this

Also it is important that you set your fuses correctly.
mirmit



Joined: 05/11/2014 09:48:22
Messages: 8
Offline

Sorry for the delay coming back to the forum.

It seems the issue is more on flashing than OptiBoot code itself. I can direct you to http://miscellany.bouillot.org/post/103629247675/travel-in-arduinos-bootloader-land where I explain the cooking part on bootloader.

Given the address 0x7800, I suspect some fuse issue.

could you run - adjusted to your own config, especially the port to use and paths

The output should be

This should match the values set in makefile.custom and board.txt

This message was edited 1 time. Last update was at 22/05/2015 11:27:50

rdww60



Joined: 05/01/2015 15:30:30
Messages: 4
Offline

w1ll14m wrote:
rdww60 wrote:
mirmit wrote:Hi,

It's been a while since I last used my arduino as ISP to program the miniwireless boards. I also killed one or two boards with experimenting. Arduino as ISP is very unreliable so I decided to buy this

Also it is important that you set your fuses correctly.


Thank you! Just ordered one, I'd rather not have the unreliable variable.
rdww60



Joined: 05/01/2015 15:30:30
Messages: 4
Offline

mirmit wrote:Sorry for the delay coming back to the forum.

It seems the issue is more on flashing than OptiBoot code itself. I can direct you to http://miscellany.bouillot.org/post/103629247675/travel-in-arduinos-bootloader-land where I explain the cooking part on bootloader.

Given the address 0x7800, I suspect some fuse issue.

could you run - adjusted to your own config, especially the port to use and paths

The output should be

This should match the values set in makefile.custom and board.txt


Thanks for the reply! I'll give this a shot a reply with the results.
bwhouse



Joined: 28/12/2015 21:01:07
Messages: 2
Offline

Did anyone have any luck with getting this working?

Mirmit I am trying you DualOptiboot6 from the linked github repo and have manged to upload it to the board and can send the firmware fine, but on reboot it doesn't appear to flash the new code.

I would really like to get this working as I have a few nodes in annoying spots, that would benefit from wireless upload.
greg in kansas



Joined: 18/01/2015 08:21:24
Messages: 15
Offline

Me also, I have been watching this to.
MrLight



Joined: 04/01/2016 04:03:30
Messages: 3
Offline

bwhouse wrote:Did anyone have any luck with getting this working?


Hi,
during the last few days I have also done some tests with wireless programming of the miniwireless boards. I can confirm that the code is partly working. But only in some cases the flashing is running successful and I think the code needs some minor optimizations...

First I struggled with the bootloader flashing and with the verification error you have mentioned above. I could solve this by adding two 10k pull-up resistors on on Pin D5 and D10. This is needed to deselect the flash and the rfm from the spi bus. Without this we have some influences an the SPI Bus. The internal pullup of the avr is not working during ISP programming.

Flashing of the bootloader works fine after that.

bwhouse wrote:Mirmit I am trying you DualOptiboot6 from the linked github repo and have manged to upload it to the board and can send the firmware fine, but on reboot it doesn't appear to flash the new code.

I would really like to get this working as I have a few nodes in annoying spots, that would benefit from wireless upload.


After that i pulled the latest libraries from LowPowerLab and changed the Select Pin from the flash from 8 to 5. I also changed the flash ManufacturerID to 0120.
After that the wireless programming of the SPI Flash works fine. But the reflashing of the avr after reboot still struggles. With the LowPowerLabs node sketch we are able to look inside the SPIFlash by dumping the first page to the terminal (press 'd') Here everything looks fine.. And bizarrely after dumping the flash with pressing 'd' and reboot the node by pressing 'r' the flashing of the node works during restart. I think the SPIFlash needs to be put in readmode but I haven't found the right command yet. (honestly I haven't looked deeply into that yet)
bwhouse



Joined: 28/12/2015 21:01:07
Messages: 2
Offline

Thanks for the tips MrLight.

MrLight wrote: After that i pulled the latest libraries from LowPowerLab and changed the Select Pin from the flash from 8 to 5. I also changed the flash ManufacturerID to 0120.


Do you mean you pulled the latest wirelessprograming libraries or the latest DualOptiboot loader and then modified it and re-built? Can you also confirm the fuse settings you have used when burning the bootloader?

Cheers
Ben
MrLight



Joined: 04/01/2016 04:03:30
Messages: 3
Offline

bwhouse wrote:
Do you mean you pulled the latest wirelessprograming libraries or the latest DualOptiboot loader and then modified it and re-built? Can you also confirm the fuse settings you have used when burning the bootloader?

Hi,
I pulled the latest wirelessprogramming libraries and not the bootloader.
To compile the bootlaoder I have installed the old arduino environment (1.5.6) which comes with make. With that I was able to compile and upload the Bootloader with "qmake miniwireless_isp". All fuses set by the make skript are correct. (As mentioned above)

I will post the bootloader when I successfully fixed that flash read error... (But it can take some time as I'm back on job for now...)
MrLight



Joined: 04/01/2016 04:03:30
Messages: 3
Offline

MrLight wrote:
I will post the bootloader when I successfully fixed that flash read error... (But it can take some time as I'm back on job for now...)


You can find a working bootloader here:
https://github.com/MrLight/DualOptiboot

Look in the AtmelStudio Folder where you can find two *.hex files. Those files are working for me. In case of a problem use the debug Version and take a look into the Output.
Take attention to the two PullUps at D5 and D10 during flashing...




Papa



Joined: 29/05/2016 16:16:13
Messages: 7
Offline

At my thread with DIY Home Automation, <Success> Wireless Programming>Anarduino Miniwireless ( http://homeautomation.proboards.com/thread/164/success-wireless-programming-anarduino-miniwireless ), I did a detailed documentation of installng Mr. Light's version of the bootloader on a miniwireless. Then later in the thread, I document creating a node with the miniwireless that can be reprogrammed wirelessly.
Papa



Joined: 29/05/2016 16:16:13
Messages: 7
Offline

Rick & all,
I updated my thread with DIY Home Automation, <Success> Wireless Programming>Anarduino Miniwireless (http://homeautomation.proboards.com/thread/164/success-wireless-programming-anarduino-miniwireless).
I used, rechecked, & tweaked the documentation & believe it to be accurate.

The Jun 7, 2016 at 7:32pm post there offers computourist_node_v2.2Mf2_choices_pub sketch which can be customized to create a wirelessly programmable node (using a miniwireless) in a computourist type network.
That Mf2 version corrects a small, but serious flaw in the previous version.

With the previous version, a node would wirelessly receive a sketch, transfer it into sketch memory, & restart the new sketch.
However, the node sketch would NOT restart if the node lost power then regained it.

Again, the new MF2 version should correct that flaw.

PS Mr Light's version of DualOptiboot bootloader is working well for me on the miniwireless. At 1024 bytes, it's only 512 bytes bigger than the Optiboot bootloader often found on Arduino compatibles AND it provides the ability to program a miniwireless wirelessly.

This message was edited 1 time. Last update was at 17/12/2016 13:46:05

jrbenito



Joined: 28/08/2014 15:17:27
Messages: 15
Offline

Rick, Papa & All,

I was able to program MW OTA following more or less what Papa had post here. Thanks!

I had to modify target.ino and node.ino from Lowepowerlab examples and also tweak the new RFM69 library to match with SPIFlashA pointed Papa┬┤s post.

Seems difficult but in fact it is very easy.
 
Forum Index » Anarduino
Go to:   
Powered by JForum 2.1.9 © JForum Team