I'm desperate

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

I'm desperate

918 Views
Microfelix
Contributor IV

It 'about a year working with MQX3.8.

I found myself very well and I was able to implement the project I wanted.

Now for various reasons, are forced to move to MQX 4.0.

Here the problems begin.

There are several incompatibilities that I'm trying to solve.

The RGB display, cache, NAND FLASH plan all things that I will try to solve.

But there is one thing that demoralizes.

And 'the bootloader that I created with lots of patience.

Filling with MQX 4.0, the S19 file does not seem right to me at least when it relates to the "vectorrom."

In fact, on the old version I had as a start:

S0030000FC

S35100000000FFFB002041E60600294308002943080029430800294308002943080000000000000000000000000000000000E184000029430800000000008B850000294308002943080029430800294308006A

S3510000004C29430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800C6

S35100000098294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308007A

S351000000E4294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002E

S3510000013029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800E1

S3510000017C2943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080095

S351000001C82943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080049

S3510000021429430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800FC

S3510000026029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800B0

S351000002AC2943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080064

S351000002F82943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080018

S3510000034429430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800CB

S35100000390294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308002943080029430800294308007F

S329000003DC294308002943080029430800294308002943080029430800294308002943080029430800E3

S31500008400FFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFF77

instead of MQX 4.0

S0030000FC

S3510000000000FC002041A20600F9FB0700F9FB0700F9FB0700F9FB0700F9FB070000000000000000000000000000000000E1840000F9FB0700000000008B850000F9FB0700F9FB0700F9FB0700F9FB070066

S3510000004CF9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700C1

S35100000098F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB070075

S351000000E4F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB070029

S35100000130F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700DC

S3510000017CF9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB070090

S351000001C8F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB070044

S35100000214F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F7

S35100000260F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700AB

S351000002ACF9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB07005F

S351000002F8F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB070013

S35100000344F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700C6

S35100000390F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB07007A

S329000003DCF9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB0700F9FB070024

S31500008400FFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFF77

This difference can not get my bootloader.

Thanks for your patience

Maurizio

Labels (1)
0 Kudos
9 Replies

633 Views
JerryFan
NXP Employee
NXP Employee

Actually, I can not find any wrong about the S19 file for MQX4.0, I just noticed that the MQX4.0 has differenct MSP initial value, entry_point address, and default exception handler address.  Did you bootloader take granted that the MSP and entry_point is a hard-coded value? If yes, it is not proper.

0 Kudos

633 Views
Microfelix
Contributor IV

Yes. have two different linkers. but I think that the problem is on the

config MQX

Il giorno 25/apr/2013 05:13, "Chongbin Fan" <admin@community.freescale.com>

ha scritto:

**

image: Freescale Community<https://community.freescale.com/index.jspa> I'm desperate created by Chongbin

Fan <https://community.freescale.com/people/JerryFan> in *MQX Software

Solutions* - View the full discussion<https://community.freescale.com/message/326320#326320>

0 Kudos

633 Views
Microfelix
Contributor IV

After a bit 'of work I noticed a few things.

my bootloader works. Just started points to 0x8000.

Now for the old compiled application works in MQX 3.8, while the filled in MQX 4.0 I have difficulty. In the sense that, if you boot into the bootloader also debug the compiled version 4.0 works, but if I make a release version it seems that the firmware allocated 0x8000 not start.

For this reason I think that the problem is only the MQX 4.0. I wonder. After all the changes I had to do to adapt to the new firmware MQX, is there some other setting I need to set?

Maurizio

ps sending a picture of memory from 0x8000

//-----------------------------------------------------------------------------

// FUNCTION:    JumpToUserApplication

// SCOPE:       Bootloader application system function

// DESCRIPTION: The function startup user application

//             

// PARAMETERS:  pointer on user vector table

//             

// RETURNS:     function never go back

//----------------------------------------------------------------------------- 

static void JumpToUserApplication(LWord userStartup)

{

    /* set up stack pointer */ 

    asm("LDR      r13, [r0]");

    /* jump to application reset vector */

    asm("ADD      r0,r0,#0x04 ");

    asm("LDR      r0, [r0]");

    asm("BX       r0");

}

0 Kudos

633 Views
Microfelix
Contributor IV

I did other tests.

Compared all'mqx old something has changed.

I am in my bootloader, when I had to redirect to 0x8000 firmware, not inizializzavo the processor. Now with MQX 4.0 seems to be necessary.

why?

0 Kudos

633 Views
Microfelix
Contributor IV

However, putting the first vector in my K70 works, the latter not.

I have a bootloader which refers to "AN2295" in my K70

Load 0x8000 in the vector, then the rest of the microprogram from 0x8400 onwards.

  vectorrom   (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400

   cfmprotrom  (R) : ORIGIN = 0x00008400, LENGTH = 0x00000020

   revisionerom(R) : ORIGIN = 0x00008420, LENGTH = 0x00000080

   rom         (RX): ORIGIN = 0x000084A0, LENGTH = 0x000FFBE0  # Code + Const data 

   ram     (RW): ORIGIN = 0x70000000, LENGTH = 0x08000000  # DDR2 - RW data
   sram    (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000  # SRAM - RW data

   # kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap)

   end_of_kd   (RW): ORIGIN = 0x77FFFFF0, LENGTH = 0x00000000

  

   # Boot stack reused by MQX Kernel data

   bstack  (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200  # Boot stack

   end_bstack  (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000

Maurizio




0 Kudos

633 Views
BiyongSUN
NXP Employee
NXP Employee

Maurizio,

I didn't see the S8 which is for the first PC address, which should be the same as the vector table offset 4.

Please check it.

We suggest customer can use the raw bin file(flash mirror) to do the upgrade.Cause different S19 generator can have different output.

Suppose the image is loaded on a fixed address. Let's say 0xC000.

The SP(SP) is on the 0xC000 and the PC is on the 0xC000 + 4.

You can debug like following:

1. use your ide(cw or iar) write the your app image to the flash.

2. hard coding several lile to boot this app image as I mentoined above.

If it works please change to use raw bin to do upgrade.

Biyong

0 Kudos

633 Views
Microfelix
Contributor IV

will. my firmware via the bootloader starts to 0x8000. but the strange

thing 'that if I compile with mqx3.8 works. is there any settings to be set

in the config?

Il giorno 25/apr/2013 07:35, "Biyong Sun" <admin@community.freescale.com>

ha scritto:

**

image: Freescale Community<https://community.freescale.com/index.jspa> I'm desperate created by Biyong

Sun <https://community.freescale.com/people/BiyongSUN> in *MQX Software

Solutions* - View the full discussion<https://community.freescale.com/message/326334#326334>

0 Kudos

633 Views
JerryFan
NXP Employee
NXP Employee

Per my understanding, the bootloader and the application used different link script. Right?

0 Kudos

633 Views
JerryFan
NXP Employee
NXP Employee

So there are two images, bootloader and application. And the S19 file in your first post is bootloader's all the application's. And you said that "Load 0x8000 in the vector, then the rest of the microprogram from 0x8400 onwards." Then the bootloader located at 0~0x7fff, and burn application to 0x8000?

0 Kudos