GIMX firmware compilation

Talk about anything concerning the source code.
Post Reply
liberotak
Posts: 5
Joined: Thu Jan 12, 2017 9:40 am

GIMX firmware compilation

Post by liberotak »

Hello,

I have an Arduino UNO R2 containing an atmega8u2 for the bootloader(recognized by FLIP as at90usb82). Due to the fact that there is no pre-compiled firmware version(HEX file) for this specific microcontroller, I tried to compiled it myself on windows using the following installation:

1. MinGW: msys-base 2013072300
2. winZsh-3.0.8deb14_NT_0.78.1-x82_MSVC6
3. avr8-gnu-toolchain-3.5.4.91-win32.any.x86
4. LUFA lib downloaded as is from GIMX git repository

Retrieving EMUG29PS4 5.8 source code from git and running "make all" through winZsh using the following configuration:

MCU = at90usb82
ARCH = AVR8
BOARD = NONE
F_CPU = 16000000

It successfully compiled but before proceeding to flash the microcontroller I tried to compile for an already existing MCU(atmega32u4) to verify that the HEX I produced is identical to the pre-compiled 5.8 firmware provided in git.

After compilation completed I noticed that my produced HEX file is not identical to atmega32u4.hex
Thus, I'm wondering if there is any other configuration settings that I'm missing than changing the MCU parameter.

Does anybody has any idea?
Thank you!
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: GIMX firmware compilation

Post by Matlo »

Hi,
The reason for the differences is that I compile with a difference gcc version on a different operating system.
I compile on Linux Mint 18.1 with the avr-gcc compiler provided in the official repository.
GIMX creator
liberotak
Posts: 5
Joined: Thu Jan 12, 2017 9:40 am

Re: GIMX firmware compilation

Post by liberotak »

Thanks for your reply.

Do you compile on 18.1 x64 or x86?
I will give it a try using your configuration.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: GIMX firmware compilation

Post by Matlo »

x64. I think I compiled 5.8 firmware in the previous Linux Mint version (17.3).
GIMX creator
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: GIMX firmware compilation

Post by Matlo »

Even with the same Linux Mint version you may not get the exact same hex results, because the compiler may have been updated.
GIMX creator
liberotak
Posts: 5
Joined: Thu Jan 12, 2017 9:40 am

Re: GIMX firmware compilation

Post by liberotak »

I tried using the configuration:

Compiled for -mmcu=atmega32u4
1.Linux Mint 18.1
2.avr-gcc (GCC) 4.9.2
3.avr-libc (1:1.8.0+Atmel3.5.0-1)
4.coreutils (8.25-2ubuntu2)

and I still get a different result than the builds provided by you.

I will try flashing the ones I produced and let you know if it worked for at90usb82

However, it's funny that both in my Windows and Linux setup I produce the same hex files using different gcc version.
How do you explain that?It seems like source code is different..I find partial matches within the compiled HEX files, meaning that some part of the code is he some and some other is not.
liberotak
Posts: 5
Joined: Thu Jan 12, 2017 9:40 am

Re: GIMX firmware compilation

Post by liberotak »

I get an address out of range error on FLIP when trying to flash with at90usb82 configuration
liberotak
Posts: 5
Joined: Thu Jan 12, 2017 9:40 am

Re: GIMX firmware compilation

Post by liberotak »

Any ideas on the error?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: GIMX firmware compilation

Post by Matlo »

The chip is probably too small as it only has 8kB of flash.
The DFU probably already consumes half of this space.
The sram is also really small (0.5kB), it may be too low to run the firmware.
GIMX creator
Post Reply