Minimig Discussion Forum
http://minimig.net/

Compiling the ARM firmware?
http://minimig.net/viewtopic.php?f=7&t=514
Page 2 of 4

Author:  Master of Gizmo [ Sun Dec 09, 2012 8:54 pm ]
Post subject:  Re: Compiling the ARM firmware?

boing4000 wrote:
Even when I don't know C language, it woult be great to compile its own firmware.
Maybe one will learn to program C in the process by changing little things and step-by-step :)


Please take it from http://www.harbaum.org/ARM_GCC.ZIP and put it onto your sourceforge page or the like.

This is untested, but compiles fine and some parts of this have proven to work in my own project.

Edit: Forgot to mention: All changes inside the original files have been #ifdef'd and thus the changes should not affect the original way of compiing this. This is based on the googlecode tree from chaos' de1 port. He is maintaining a nice archive of the various original code inside his source tree.

Author:  boing4000 [ Wed Dec 12, 2012 9:56 am ]
Post subject:  Re: Compiling the ARM firmware?

Thanks for your work and the archive.
I would like to compile this in Linux using gcc, but all I get from "make" is:
Code:
/bin/sh: 1: arm-elf-as: not found
make: *** [crt.o] error 127

Is there some special (debian) package required?

Author:  chaos [ Wed Dec 12, 2012 10:23 am ]
Post subject:  Re: Compiling the ARM firmware?

boing4000: you are probably missing the ARM GCC cross-compiler, or the executables are not in the path. If you haven't installed them yet, I recommend to use the Sourcery G++ lite toolchain (an ARM GCC compiler 'port').

Author:  Master of Gizmo [ Wed Dec 12, 2012 12:32 pm ]
Post subject:  Re: Compiling the ARM firmware?

chaos wrote:
boing4000: you are probably missing the ARM GCC cross-compiler, or the executables are not in the path. If you haven't installed them yet, I recommend to use the Sourcery G++ lite toolchain (an ARM GCC compiler 'port').


Make sure you install a "bare metal" compiler (that's one that's meant to compile code to run directly on the "bare" chip without e.g. a linux underneath. And it needs to have "newlib" support which is the bare metal replacement for the libc which normally provides printf and friends under a full featured linux.

I had success with these instrcutions:
http://www.doctort.org/adam/index.php?s=arm-elf-gcc
and
http://www.doctort.org/adam/nerd-notes/arm-helloworld.html

Similar instructions here:
http://www.kunen.org/uC/gnu_tool.html

or in german:
http://www.alphapogo.de/

Author:  boing4000 [ Wed Dec 12, 2012 1:07 pm ]
Post subject:  Re: Compiling the ARM firmware?

I've installed all kind of package. It don't work, seems GCC and C in general will never be my cup of tea...

Author:  minimig_emu [ Wed Dec 12, 2012 4:16 pm ]
Post subject:  Re: Compiling the ARM firmware?

Master of Gizmo wrote:
Please take it from http://www.harbaum.org/ARM_GCC.ZIP and put it onto your sourceforge page or the like.

Thanks for source

Why has "firmware.hex" 320KB after compilation?
When the USB firmware update around 40 kilobytes. I think this the file ARM_FIRMWARE_BIN_AYQ090911.zip

I use to compile Yaqarto ARM tools.

Author:  MMrobinsonb5 [ Wed Dec 12, 2012 6:02 pm ]
Post subject:  Re: Compiling the ARM firmware?

boing4000 wrote:
I've installed all kind of package. It don't work, seems GCC and C in general will never be my cup of tea...


What do you get if you try this:

find / -iname \*arm-elf\*

Author:  boing4000 [ Thu Dec 13, 2012 7:44 pm ]
Post subject:  Re: Compiling the ARM firmware?

MMrobinsonb5 wrote:
find / -iname \*arm-elf\*


No output... but I will not try any further and better stay with the FPGA core :)

Author:  Master of Gizmo [ Thu Dec 13, 2012 9:21 pm ]
Post subject:  Re: Compiling the ARM firmware?

minimig_emu wrote:
Why has "firmware.hex" 320KB after compilation?


Look at the size of the bin file, this is the real code.

The firmware is using printf which in turn makes the binary bloated as printf can handle floats and thus causes all kind of floating point arithmetic to be included.

This can of course be optimzed and i once ran the entire firmware in the 64k RAM.

But the arm has 256k flash, so no urgent need to optimize if the code runs from flash (as it usually does). I preferred to leave the source code untouched as far as possible.

Author:  minimig_emu [ Thu Jan 24, 2013 3:47 pm ]
Post subject:  Re: Compiling the ARM firmware?

Any advice?

Whether compiled original ARM core or from by user Master of Gizmo. So not one does not work. Thus green LED flashes as crazy and lights at 30%. But the screen of nothing: (

Page 2 of 4 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/