[mc1322x] building on a mac

Andrew Pullin pullin at berkeley.edu
Fri Apr 16 05:30:15 EDT 2010


You should test something that uses floats, sqrt() and/or cos(), -lm, 
and -static , and see if it all works out, and what size the final ELF is.
I haven't got working gcc with newlib, soft-float, interworking, and the 
libmc1322x code working yet, but I'm learning a lot about GCC trying to 
do so.

-Andrew

On 4/15/2010 8:44 PM, Dean Hall wrote:
> Immediately after sending that last message, I did:
>
> $ ../tools/mc1322x-load.pl -f blink-allio_redbee-econotag.bin  -t 
> /dev/tty.usbserial-000030FDB
> .......
>
> I was watching the dots roll by, and I just by circumstance hit the 
> reset button and:
>
> ........CONNECT
> Size: 2520 bytes
> Sending blink-allio_redbee-econotag.bin
> done sending files.
>
> And the red & green LEDs on the econotag are flashing!
>
> Building and loading on a Mac is doable and not too difficult.  I've 
> written notes on the process and will assemble them into a 
> step-by-step webpage and share that soon.
>
> (sorry if this is basic stuff for everybody else)
>
> !!Dean
>
>
> On Apr 15, 2010, at 22:36 , Dean Hall wrote:
>
>> Update to my instructions:
>>
>> - sudo port install arm-elf-gcc
>> + sudo port install arm-elf-gcc +interwork
>>
>> With this change, I still get interworking warnings and a curious 
>> error in the same line of start.S that was mentioned in today's "ROM 
>> vars" email thread:
>>
>> /opt/local/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: Warning: 
>> /opt/local/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/lib/libc.a(lib_a-strlen.o) 
>> does not support interworking, whereas per_redbee-econotag.elf does
>> ../src/start-romvars.o:../src/start.S:124: undefined reference to `no 
>> symbol'
>> collect2: ld returned 1 exit status
>>
>> Many of the binaries are built.  For example, 
>> blink-allio_redbee-econotag.bin is 2520 bytes (I post this for 
>> comparison, I don't know what its proper size should be; please let 
>> me know if this is in the ballpark).
>>
>> I've installed the FT2232 drivers and get these devices when the 
>> econotag is plugged in: /dev/tty.usbserial-000030FDA and 
>> /dev/tty.usbserial-000030FDB so I'm presuming the one ending in 'A' 
>> is for the JTAG and 'B' is for UART1 (I saw this in the docs somewhere).
>>
>> Then I installed 2 CPAN modules:
>>    http://search.cpan.org/~cook/Device-SerialPort-1.04/SerialPort.pm
>>    http://search.cpan.org/dist/TermReadKey/ReadKey.pm
>> to get mc1322x-load.pl to run:
>>
>> $ ../tools/mc1322x-load.pl -f blink-green_redbee-econotag.bin -t 
>> /dev/tty.usbserial-000030FDB
>> ..............................
>>
>> The periods lead me to believe the perl script is not receiving data 
>> from the UART.  The FT2232 shows up on my USB scan.  I'm just not 
>> transferring data yet.
>>
>> another step closer,
>>
>> !!Dean
>>
>> On Apr 14, 2010, at 14:19 , Dean Hall wrote:
>>
>>> I tried to get an old Dell laptop up and going so I could follow 
>>> development using documented procedures, but the HDD wasn't large 
>>> enough for Win32, VMware Player and Ubuntu 9.10; and Ubuntu 9.10 
>>> (clean install) by itself still froze on me 2-5 minutes after login 
>>> even with 1 G RAM.  So I'm back to my more familiar platform, Mac OS 
>>> X 10.5.  Here's what I did to get openocd going:
>>>
>>>   # Install Xcode from OS X install disc
>>>   # Install or make sure Macports is up-to-date
>>>   $ sudo port install openocd curl`
>>>   $ curl -G http://mc1322x.devl.org/files/openocd.cfg > openocd.cfg`
>>>   # Plug Econotag into USB port
>>>   $ openocd
>>>   # Resulted in:
>>>
>>>   Open On-Chip Debugger 0.4.0 (2010-04-13-21:34)
>>>   Licensed under GNU GPL v2
>>>   For bug reports, read
>>>       http://openocd.berlios.de/doc/doxygen/bugs.html
>>>   srst_only separate srst_gates_jtag srst_open_drain
>>>   jtag_ntrst_delay: 200
>>>   2000 kHz
>>>   Info : max TCK change to: 30000 kHz
>>>   Info : clock speed 2000 kHz
>>>   Info : JTAG tap: mc13224.cpu tap/device found: 0x1f1f001d (mfg: 
>>> 0x00e, part: 0xf1f0, ver: 0x1)
>>>   Info : Embedded ICE version 7
>>>   Error: EmbeddedICE v7 handling might be broken
>>>   Info : mc13224.cpu: hardware has 2 breakpoint/watchpoint units
>>>
>>> I haven't read if arm-linux-gcc is required for libmc1322x, but 
>>> following last week's conversation about linking math libs, 
>>> arm-elf-gcc should work if interworking is enabled.  So here's what 
>>> I did to get arm-elf-gcc installed:
>>>
>>>   $ sudo port install arm-elf-gcc # 4.3.2 with newlib
>>>   $ git clone git://git.devl.org/git/malvira/libmc1322x.git
>>>   $ cd libmc1322x
>>>   $ vi Makefile.include  # CROSS_COMPILE := arm-elf-
>>>   $ cd tests
>>>   $ make BOARD=redbee-econotag
>>>   # Resulted in:
>>>
>>> <snip>
>>>   printf.c:16: error: expected ‘)’ before ‘->’ token
>>>   make[2]: *** [obj_redbee-econotag_board/printf.o] Error 1
>>>
>>> This is where I am stuck.  I'm guessing this error is due to a 
>>> conflict with the definition of "FILE" in newlib.  In the mean time, 
>>> I commented out the offending code and am working on the build 
>>> errors after that.
>>>
>>> So, is there anyone else out there developing on a Mac that wants to 
>>> follow along, bounce ideas and get this going?
>>>
>>> !!Dean
>>
>
>
> _______________________________________________
> mc1322x mailing list
> mc1322x at devl.org
> http://devl.org/cgi-bin/mailman/listinfo/mc1322x




More information about the mc1322x mailing list