Notes on MightyCore

Showing the Garden just for fun
Posts: 208
Joined: Sun Sep 18, 2016 6:07 pm

Notes on MightyCore

Postby rpu_bus » Wed Jan 10, 2018 12:31 am

First make a fork

I had problems building the serial bootloader on Ubuntu 17.10 so I tried 16.04 on a different machine which is what these notes are for

Github cloned it into my Samba file-share with has CR+LF on the scripts, it is the the everlasting line-ending gift from hell. Which was some of the issue I was having on 17.10.

Code: Select all

make atmega1284p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
avr-gcc -g -Wall -Os -fno-split-wide-types -mrelax -fno-caller-saves -mmcu=atmega1284p -DF_CPU=16000000L  -DBAUD_RATE=115200 -DLED_START_FLASHES=2    -DLED=B0  -DBIGBOOT -DUART=0 -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe -Wl,--relax -nostartfiles -nostdlib -o atmega1284p/optiboot_flash_atmega1284p_115200_16000000L.elf optiboot_flash.o -lc
optiboot_flash.o: In function `appStart':
/home/rsutherland/Samba/git/MightyCore/avr/bootloaders/optiboot_flash/optiboot_flash.c:887: undefined reference to `eeprom_write_byte'
/home/rsutherland/Samba/git/MightyCore/avr/bootloaders/optiboot_flash/optiboot_flash.c:887: undefined reference to `eeprom_read_byte'
collect2: error: ld returned 1 exit status

Looking in the bootloader I see

Code: Select all

#if defined(SUPPORT_EEPROM) || defined(BIGBOOT)
    case 'E': // EEPROM
   do {
       putch(eeprom_read_byte((uint8_t *)(address++)));
   } while (--length);

some how the SUPPORT_EEPROM flag is being set, but I don't want to waste time looking at the Makefile it is to full of cruft (would that be better in a readme, or a donotreadme).

anyway I am just going to comment that and build the bootloader.
Last edited by rpu_bus on Wed Jan 10, 2018 1:31 am, edited 2 times in total.

Posts: 208
Joined: Sun Sep 18, 2016 6:07 pm

Re: Notes on MightyCore

Postby rpu_bus » Wed Jan 10, 2018 1:09 am

I striped the other hex files to limit the confusion.

Anyway this is the bootloader image I ended up with that has UART = 1

If you want to try it I guess you can replace the one you have in

Code: Select all


Note: I will probably nuke the repo in a few weeks but wanted to have a look at the bootloader, I was using xboot on my 1284p board but would like to have options in case I have problems when I start working on it again.

Return to “Garden”

Who is online

Users browsing this forum: No registered users and 1 guest