Creating a New BSP

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a New BSP

Jump to solution
1,145 Views
c_dawg
Contributor III

First of all I'm using CW10.3 with MQX 3.8.1.

In the MQX Real-Time Operating System User guide chapter 5 it describes using a "Cloned Existing Configuration" to develop a new BSP.  I'm attempting to go from a TWR-K60n512 to my board which uses a K60FX512VLQ15.  I already cloned the BSP successfully, but I don’t know what to change in all those files that chapter 5 mention. Are there any examples on how to manipulate the files mentioned?  Especially when making changes going from the TWR-K60n512 to the K60FX512VLQ15.

Currently when attempting to debug my board with the cloned BSP I get this error:

Failed writing target address0

Expected Result: 0x200fbff

Actual Result: 0xffffffff

I verified the memory map is different looking at Chapter 4 in the Reference Manual for each chip.   Now I could really use some suggestions on how to use the memory map in the reference manual to make the changes in all those files mentioned in Chapter 5 of the MQX real-time operating system user guide.  Or is it the *mem file in the debugger Config?

Tags (2)
1 Solution
452 Views
Martin_
NXP Employee
NXP Employee

In my opinion, that is debugger configuration, because no matter the bin file is, debugger seems not able to flash it. In the debugger configuration, you need to select appropriate processor (K60F) and mem file.

K60F (TWR-K60F120M) has different clock module compared to K60DN512Z (TWR-K60N512). Flash module is different (FTFE versus FTFL). Then the mapping of internal MCU signals to MCU pins might be different. MCU header file with register definitions might be different.


For K60FX512VLQ15 I would recommend to select TWR-K60F120M as baseline BSP for a clone.
TWR-K60F120M has K60FN512 chip, which is almost the same as K60FX but the FlexMemory. The modification of the processor startup code would be much easier.

View solution in original post

0 Kudos
7 Replies
453 Views
Martin_
NXP Employee
NXP Employee

In my opinion, that is debugger configuration, because no matter the bin file is, debugger seems not able to flash it. In the debugger configuration, you need to select appropriate processor (K60F) and mem file.

K60F (TWR-K60F120M) has different clock module compared to K60DN512Z (TWR-K60N512). Flash module is different (FTFE versus FTFL). Then the mapping of internal MCU signals to MCU pins might be different. MCU header file with register definitions might be different.


For K60FX512VLQ15 I would recommend to select TWR-K60F120M as baseline BSP for a clone.
TWR-K60F120M has K60FN512 chip, which is almost the same as K60FX but the FlexMemory. The modification of the processor startup code would be much easier.

View solution in original post

0 Kudos
452 Views
c_dawg
Contributor III

I tried changing the debugger configuration and still had problems.  I'm guessing it is operator error.  Is there any tutorial or forum on how to select the appropriate processor and .mem file?

0 Kudos
452 Views
Martin_
NXP Employee
NXP Employee

see on page 4 of the attached document; please note also the "Target type" it should be changed to the right MCU type. (K60FX512 for example)

452 Views
adt
Contributor III

Hi Martin,

I have done clone taking base BSP is twrk60f120m,then change the controller from bsp's processor expert and changes made twrk60f120m.h file related the flash,and generate new project now problem is not in build ,problem is in debug ,At the time of debug mes is "No source available 0xFFFFFFFE 0xFFFFFFFE()"

0 Kudos
452 Views
adt
Contributor III

Hi Colin,

I also want to use K60FX512 of 150 MHz ,as per information on the Community  I have clone it from K60f120m to K60FX512 the in bsp processor expert ,I have seen the K60FX512 controller ,Changes have done as per given per after generate new  code from processor expert for new device in Cpu.c there are Cpu_MCGAutoTrim(1);function is not create,

I can comment it and compile then there is not any error in bsp as well as my code but it is not working they are stop on

while((MCG_S & 0x0CU) != 0x08U) {/* Wait until external reference clock is selected as MCG output */

  }

on this line on CPU.c plz help us as early as possible if  any one have idea about it

0 Kudos
452 Views
c_dawg
Contributor III

I unfortunately had to get away from the K60FX512.  I was using the MQX operating system and it became a lot of work to write drivers for the flex memory.  Having a tight schedule I switched to the MK60FN1M0VLQ12 because the flex memory wasn't a huge advantage to justify all the work required.

Colin

0 Kudos
452 Views
c_dawg
Contributor III

Thanks for showing how to choose the correct Debugger Configuration Files.  This is a great addition to Chapter 5.4 in the Freescale MQX Real-Time Operating System User Guide.  On page 4 of your instructions you are able to select any chip as the ‘Target type:’

Will the TWR-K60F120M.tcl and TWR-K60F120M.mem file be fine for debugging the K60FX512VLQ15 on my board? 

I think the answer is yes because I was able to load the chip on my board and get rid of this error mentioned above:

Failed writing target address0

Expected Result: 0x200fbff

Actual Result: 0xffffffff