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

Issue with Atmega8 #336

Closed
dakhnod opened this issue Dec 27, 2021 · 2 comments
Closed

Issue with Atmega8 #336

dakhnod opened this issue Dec 27, 2021 · 2 comments
Labels
Discussion More conversation than actual bug or change.

Comments

@dakhnod
Copy link

dakhnod commented Dec 27, 2021

When flashing my Atmega8 using the command line
make atmega8_isp AVR_FREQ=8000000L BAUD_RATE=57600 LFUSE=E4 HFUSE=DC LED_START_FLASHES=3 LED=B0 BAUD_RATE=9600
the LED blinks, thus the bootloader is started.
After a power cycle the LED doesn't blink, so the MCU doesn't start for some reason.

When setting the boot flash section to 256 words, the boot section start is 0x0F00.
When using objdump with the hex (attached), the address in the hex seem to start at 0x1E00:
1e00 01c0d6c0 11248fe5 94e09ebf 8dbf84b7 .....$..........
Shouldn't the bootloader code be written to 0x0F00?

In link_optiboot.ld BOOT_START is used, but I cannot figure out where that is defined.

@dakhnod
Copy link
Author

dakhnod commented Dec 28, 2021

My bad, I just had to run make with BOOT_ON_POR=1, that fixed it.

Still, could someone please explain to me why the starting address in the hex file does not math the flsah address of the bootloader in the MCU?

@WestfW
Copy link
Member

WestfW commented Dec 28, 2021

Atmel documents code addresses in WORDS, but all the gnu tools use/specify the address in bytes.
word 0xF00 == byte 0x1E00

@WestfW WestfW added the Discussion More conversation than actual bug or change. label Dec 29, 2021
@WestfW WestfW closed this as completed Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion More conversation than actual bug or change.
Projects
None yet
Development

No branches or pull requests

2 participants