bootloader + code is less then %100 but fails?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
ulao
Rank 4
Rank 4
Posts: 454
Joined: Mon Aug 25, 2008 8:45 pm

bootloader + code is less then %100 but fails?

Postby ulao » Mon Jan 16, 2017 4:22 pm

I know it's like a desert around here anymore but avr-freeks are not helping much. I hope someone knows enough about this to help. Going to keep it simple and to the point for now. I'll be happy to add anything I can so just ask.

I have a atmega328 chip
I have the bootloader that most everyone uses with v-usb and it compiles to around %5 of the chip.
My code when compiled to about %86 fits fine
I use bootloadhid to flash

when my code grows beyond %86 I get flahs errors but %86 + %5 does not come close to %100? I'm trying to track down where the limit is coming from.

Here is a compile from my main code
Device: atmega328p
Program: 28704 bytes (87.6% Full)
(.text + .data + .bootloader)
Data: 1227 bytes (59.9% Full)
(.data + .bss + .noinit)

First I have no idea why it says .bootloader because I do no have that defined in my code anywhere. I don't think that is related to my issue but a problem in itself. I though you had to have a "__attribute__((section(".bootloader"))) " to do that?

When I build the bootloader code I see this
Program Memory Usage : 1910 bytes 5.8 % Full
Data Memory Usage : 59 bytes 2.9 % Full


So if I add 5.8(boot) + 87.6(code) I'm only at 93.4, we would this cause flash errors.

Errors I get from botloadhid
device size -00032768
data (28674) exceeds flash size!
flashing 28800 (0x7080) bytes start at 0

Return to “V-USB”

Who is online

Users browsing this forum: No registered users and 5 guests