Linked Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linked Error

2,019 Views
shab
Contributor I

Experts,

 

Requirement: 

 

I am working on a board which has MPC860 processor and Intel flash memory.

I wrote some c-code to validate the flash memory like erasing,programming etc.

So, this c-code has to be loaded onto flash memory.

 

 

Procedure I followed:

 

  •      I initially created a project by selecting the 860 processor and the board is generic.

·         I deleted the files which were there in source and I added all the source files which I have written.

·         I gave "Make" command and it gave some compiler and linker errors. I resolved all those errors.

·         Once the MAKE is successful, I gave run command.

·         It executed the config file and made the entry point to "main.c"

·         It created debug.mot file in the default project folder.

·         When I decoded the debug.mot, I found the source code is in memory location of SDRAM but not in flash.

·         I erased the entire flash chip and tried to load debug.mot using program/Verify operation.

·         Codewarrior tool throws an error. The error is because of the restricted address range as the debug.mot has code in SDRAM locations.

·         So, I have created the project in ROM version and did "MAKE".  

  • It throws "Link Error:Undefined:"Interrupt Handler"
  • Referenced from '.reset' in eppc_exception.

 

What changes do I need to do inorder to generate ROM.mot file?

I didn't change anything. I removed the defaultly created source code files and added my own source code files.

Please help me. 

 

Labels (1)
0 Kudos
10 Replies

710 Views
shab
Contributor I

Hi,

 

I downloaded the sample code which is provided in Freescale website.

I didn't include any of my source files with it.

I created a sample project and tried to debug the same in ROM version.

The UART code compiles well but throws exception on DEBUG.

I have attached the code for your reference.

What may be the reason?

 

MPC860COD17.zip

Message Edited by t.dowe on 2009-11-04 11:20 AM
0 Kudos

710 Views
J2MEJediMaster
Specialist I

You will have to file a service request on this. It is beyond my meager capabilities to resolve the problem.

 

---Tom

 

0 Kudos

710 Views
shab
Contributor I

Hi,

 

I have downloaded the UART code from Freescale website and tried to check whether the UART is working in the correct manner. When I have added all the files in Source and tried to do Debug for ROM version, it throws Power PC exception. Why does it happen so? I want to check the Serial interface connection.

 

 

Thanks!

0 Kudos

710 Views
J2MEJediMaster
Specialist I

The serial driver is either trying to access a register at a wrong address, or, if the driver's using interrupts, the interrupt handler may not be set up correctly.

 

---Tom

0 Kudos

710 Views
shab
Contributor I

One more update:

 

Whatever the ROM.mot file generated is not within the flash boundaries.

The flash boundary is 0xFF80 0000 -- 0xFFFF FFFF.

What changes needs to be done inorder to generate the ROM.mot file which should be in flash boundary?

0 Kudos

710 Views
J2MEJediMaster
Specialist I

First thing to do is just trying making a default program using the CodeWarrior New Project wizard. Do not change anything. See if that works. Try it from the IDE as well as the make utility to confirm that the tools are not messed up, somehow.

 

Beyond that, you need to file a service request for this. Click here to do that.

0 Kudos

710 Views
shab
Contributor I

Hi,

 

 

I was able to run the default project in both debug and ROM version.

I am able to generate the ROM.mot file by making changes in the linker command file and linker settings. I loaded the file onto the flash and it is loaded successfully.

But I am not perfectly sure that the above changes are correct as I am unable to see the boot prompt on the screen when I connect the board through serial port connection.

 

One problem is that the code for serial interface may be wrong because of which I am unable to see the prompt on the screen.

 

In order to isolate the problem, I downloaded the code onto SDRAM and gave debug command. Machine check exception is thrown at some point in the c-code of serial interface.

 

Can you please serial driver (SCC) of MPC860P?

0 Kudos

710 Views
J2MEJediMaster
Specialist I

OK, so it seems that the tools are working. Can you single step through the debugger from main() or set breakpoints? If so, then that clears up any issues with the debugger and debugger interface. What is the name of the 860 board that you are using? I think that possibly the generic 860 board choice might have the program trying to initialize the serial device registers using the addresses for a generic board, and the board that you are using might have the serial interface registers located some where else in the address space. That might explain the exception that is happening.

 

---Tom

0 Kudos

710 Views
J2MEJediMaster
Specialist I

I need a little more information. What tools are you using and their version number?

 

Also, entry point can be a bit confusing. Typically the entry point is into the startup code that initializes the processor's MMU (if any), external memory addressing (if any), on-chip peripherals, and the stack. This entry point is pointed to by the reset interrupt vector. When you changed the entry point to main() you may have broken something. Is there a demo program the builds and runs on the board?

 

 

0 Kudos

710 Views
shab
Contributor I

Hi,

 

I am using codewarrior

CW Dev Studio, Power Architecture, Professional Edition, v8.8, Build 80229.

I have attached the installed plugin's.

 

 

Earlier I used to get Linked error. As I have included the interrup.c function which is generated by default upon creating a new project, Linked error is not thrown.

 

MAKE is done successfully. When I do debug/Run command, it throws an error "internal state:Bad status".

 

I have attached the project files in gesb.zip for your reference.

 

There is no demo program.

 

Installed Plugins.TXT

gesb.zip

Message Edited by t.dowe on 2009-11-03 09:34 AM
0 Kudos