Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloader hanging on field application -2560 #5

Open
loathingKernel opened this issue May 10, 2016 · 6 comments
Open

Bootloader hanging on field application -2560 #5

loathingKernel opened this issue May 10, 2016 · 6 comments

Comments

@loathingKernel
Copy link
Owner

From @andrebstv on February 20, 2016 13:50

Hi,

I couldn`t help but notice the bootloader is not protected by a WDT. I have a device on the field that from time to time hangs, and as I can see from logs writen on a SD card It does in the bootloader section. (it shows a "reboot" string on the log and then no "Power ON" string which is the very first thing it does on app start).

Ive changed the bootloader code to include proper wdt protection, but Im unable to compile it... It may sound like a noob error, but it fails on the memcpy_PF... I`ve seen previous ppl having this error but no solution to it.

I do compile on windows, using the WinAVR toolchain.

Where should I change on the makefile so I can compile it? Tried everywhere and still got this error.

Note that I would gladly post the wdt fix once I`ve tested.

Copied from original issue: codebndr#23

@loathingKernel
Copy link
Owner Author

What I think that will fix your issue is downloading the AVR toolchain from here http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx. I have never compiled an AVR program on Windows so I cannot warn you about any potential issues you might encounter with the process.

Other than that, I am interested in seeing your fixes, which is gladly welcomed.

@loathingKernel
Copy link
Owner Author

From @andrebstv on February 27, 2016 13:47

I solved the compiling issue. Apparently you need to compile the target atmega328 to generate some .o files that are used when compiling the atmega2560 target and the debug2560 target.

Its a bug on the makefile. I wont try to fix that. I might break something... my makefileism`s skill are not good.

I will do some more testing with the modded bootloader, that includes the wdt, and if successful post the fixes.

@loathingKernel
Copy link
Owner Author

From @andrebstv on February 27, 2016 16:19

Correction: it's actually a difference on the pgmspace.h from the winavr toolchain vs the atmel toolchain.
The make file is correct.

@loathingKernel
Copy link
Owner Author

From @andrebstv on March 28, 2016 0:17

Created the pull request. Still sometimes the signature seems to be corrupted and the bootloader doesn`t start the application.... a fresh upload solves this. Main thing is that the board is no longer hangable.

@loathingKernel
Copy link
Owner Author

From @andrebstv on April 1, 2016 17:20

The problem was fixed, but still everytime the application resets it hangs on the bootloader. Never allowing the user app to run. I even tried to enforce the eeprom signature write on the user app, to trick the bootloader but no avail.

A fresh upload, that is a firmware "update", fixes the problem...Probably deactivating the eeprom signature check fixes it... but that seems a bit like a cludge.

Help please?

@loathingKernel
Copy link
Owner Author

Can you give me more information? Have you tried increasing the WDT timer to give more time for the bootloader to load?

Edit: Nevermind my suggestion, just noticed that you set it to 8 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant