Main Site Documentation

FEZopen


#1

I tried to compile the code on codeplex (I checked it out in D:\MicroFrameworkPK_v4_1\Solutions\USBizi_OpenSource) but it doesn’t compile

[quote]D:\MicroFrameworkPK_v4_1\DeviceCode\Targets\Native\LPC24XX\deviceCode\VIC\LPC24XX__VIC.cpp: In function ‘void IRQ_Handler()’:
D:\MicroFrameworkPK_v4_1\DeviceCode\Targets\Native\LPC24XX\deviceCode\VIC\LPC24XX__VIC.cpp:112: error: interrupt Service Routines cannot be coded in Thumb mode[/quote]

Why doesn’t it compile ? I successfully compiled a EA_LPC2478 clone made by me with the solution wizard.

I want to help but I have no idea what has to be done, I’ll have to wait until the project is more advanced…


#2

I know exactly why it didn’t compile :slight_smile: Give some time and we will have it all working for you

It is because the project is compiling as thumb but thumb is not allowed for everything


#3

I tried to erase the USBizi bootloader following the procedure in the porting kit guide without success:

  • On the Panda connect MODE to GND
  • Connect Panda to PC using a CP2102 USB to UART module
  • Reset Panda while pressing LDR button
  • In Tera Term connect to COMx and set the baud rate to 115200
  • Sending “V” shows 1.07 BL
  • Erase all : Send “E” “Y”
  • Send “X”
  • Transfer “Do_NOT_use_will_erase_firmware.GHI” using XMODEM 1k

When the transfer is finished the Panda reboots and shows the usual USBIzi/Msdbg dump, what am I doing wrong ?

Also, when loading “BlinkPandaLED.hex” in Flash Magic and press “Start” I get a message saying that the hex file is invalid, is this normal ?

Thanks !


#4

I take it you were able to compile and now ready to load your app on FEZ? If you did then how did you build the VIC in ARM?


#5

No, I think it’s too advanced for me right now and I don’t have a JTAG adapter.

I just wanted to run some simple C code


#6

Let me get back on it and test things out + add more to the book. Maybe within a week


#7

Thanks, I’ll find something else to play with meanwhile and maybe read the LPC2387 & PK docs :slight_smile:


#8

I compared the contents of “Do_NOT_use_will_erase_firmware.GHI” and “BlinkPandaLED.hex” and they are binary the same


#9

And they are exactly the same as firmware :wink: I didn’t want anyone to erase the firmware before the book is completed.


#10

hahaha


#11

Is the hardware protection in CRP3 or 2 ? I’m asking this because if it is level 3 there is no way of using JTAG on Panda if you don’t provide the erase and unlock application…

Am i correct ?


#12

We will provide instructions on how to erase panda to use JTAG


#13

In preparation, and maybe assisting, would you be using OpenOCD?


#14

You mean the book? The book is open so anyone (you?)can add more to is including OpenOCD. The goal is to cover the NETMF porting basics and not tools


#15

It’s going to take a couple of weeks to get hold of a Panda in London. But I have an Olimex JTAG dongle wired up ready to attach to the Panda, plus a TinyCLR built with the PK that includes new driver and native code. Right now I’m just working out what is required on the LPC to get the CLR running, and working out from the NXP user manual what settings are required for OpenOCD. It looks from the book that it should be fairly straight forward to reflash the Panda.


#16

I’ve got my working with openOCD, debugging etc… eLua is running…


#17

I guess that means that you had not problems with the CRP in the LPC2387?

Can you show us your OpenOCD config?


#18

He had contacted GHI directly for a blank FEZ


#19

I did get a “bank board”. I have a sourceforge.net project for panda board. It is under construction. I have a hot project that needs to get done before I can get git and the rest of the projects up there.

For now here is the openocd config

  1. I got a 20 pin to 10 pin JTAG converter. Had one from a project. There is a ARM 10 pin standard, but I had to rewire the one I got. Also, made a right angle so the “prototype” board can still be used while using the JTAG. Also, going to do a simple python script to update flash using the boot loader ROM (doing this for another project). There is a GUI for Linux (LPC2000 loader or something) or there is a windows app that will do the same thing. This way you don’t need a jtag device.

  2. using a JTAGKey

  3. Using Linux

  4. Create a file called panda.cfg
    #set _CPUTAPID 0x9f3f1f1f
    adapter_khz 900
    source [find interface/jtagkey-tiny.cfg]
    source [find target/lpc2387.cfg]

gdb_memory_map enable
gdb_flash_program enable

  1. create a shell script called panda.sh

openocd -f /home/tcmichals/Projects/Cygnetron/BlueTooth/ARM/openocd/panda.cfg -f /usr/local/share/openocd/httpd/ -debug 3

This connects to the board. I use a shell script because I cannot remember all the paths etc. So, makes it easier.

When gdb is invoked, it looks for a default file, .gdbinit, this will do all of the configuration etc, and get you to main.

Also here is the .gdbinit

target remote localhost:3333
monitor reset init
monitor sleep 500
monitor poll
monitor reset run
monitor sleep 500
monitor soft_reset_halt
thbreak main

From the shell execute
./panda.sh

This is helpful when you want to do debug source code.

The goal is get the sourceforge up and running with code and detailed instructions etc.
I have freeRTOS running (need to debug clocks, etc. ) that project will be also in sourceforge.


#20

sourceforge http://sourceforge.net/projects/pandaboard/