RCW CodeWarrior to Flex Builder Migration

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

RCW CodeWarrior to Flex Builder Migration

683 Views
smiller2
Contributor III

I am new to both CodeWarrior and FlexBuilder, so these may seem like obvious questions.   I went through CodeWarrior to define the RCW.   I generated a binary output which created a 1KB file, PBL_binary.bin.   

I am assuming that it is that file that I would program into the bottom of the QSPI Flash?   Does this file contain both the RCW and PinMux?   Or did I make some mistake generating it?

My hardware does not arrive until next week.   I only have the LS1046A FRWY board as an example.    (My hardware will be the same LS1046A processor.)  I tried to dump the first 1K bytes of the QSPI.      Using a HEX editor, it contains a bunch more data than my generated file.  The beginning portion seems similar.  However,  there appears to be a weird byte swap between the two files.     Do I have to set endianness somewhere?

The LSDK indicates that FlexBuilder can generate the RCW.   I am trying to follow along with the custom machine portion.   However, I don't know where to get the *.rcw file.   Can I export that from CodeWarrior?  

Also, there seems to be references to the RCW both in an RCW folder and down in u-boot.   Are these two versions of the same thing?   Or, does u-boot use the RCW for some other purpose?    

I am assuming that the initial RCW is done with CodeWarrior and then that information is added to the source code repository for use by FlexBuilder and source code control.   Is that correct?

Thanks.

 

 

 

0 Kudos
4 Replies

672 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following procedure to generate images with flex-builder.

1. In flex-builder build environment, please run "flex-builder -c rcw -m ls1046afrwy".

2. Please go to folder packages/firmware/rcw/ls1046afrwy/NN_NNQNNPNP_3040_0506/ to modify file rcw_1600_qspiboot.rcw according to your custom board.

3.  Please run the following command to regenerate ATF images.

$ flex-builder -c rcw -m ls1046afrwy

$ flex-builder -c atf -m ls1046afrwy -b qspi

You will get bl2_qspi.pbl and fip_uboot.bin in folder build/firmware/atf/ls1046afrwy/.

Image bl2_qspi.pbl includes RCW + PBI + BL2, please deploy it at 0x00000000 on QSPI flash.

fip_uboot.bin includes BL31+ TEE (BL32) + U-Boot/UEFI (Bl33), please deploy it at 0x00100000 on QSPI flash.

For QSPI memory layout, you could refer to section "4.2 LSDK memory layout and Userland" in LSDK 20.12 user guide.

0 Kudos

662 Views
smiller2
Contributor III

Thank you very much for the help.    I tried to follow the directions, but I guess that I am missing something.    I apologize, as it is probably something obvious that I skipped.  

 

I created a new folder for the new design, in packages\firmware\u-boot\board.

I created a new defconfig file in packages\firmware\u-boot\configs

I added a entry for the new design in build_lsdk.cfg

I added a new folder to packages\firmware\rcw

I created a new local branch and checkout that new branch.

The temporary name assigned to the board is "neosem_hp_ibir"

The "flex-builder -c rcw -m neosem_hp_ibir "  completes without error

I added a new folder to packages\firmware\atf\plat\nxp\soc-ls1046

When I run "flex-builder -c atf -m neosem_hp_ibir -b qspi"  then it fails.   It switches the branch back and then fails with an is not supported message. 

Below the "***"  below is the console output that I get.  

Other questions are:   How do I convert the Processor Expert output files from Code Warrior into the appropriate flexbuilder folders?    Code Warrior will output the RCW as a binary or a text file.  However, the flexbuilder wants this as a *.rcw.     These both seem to be text files with different formatting.   Do I need to manually copy and paste values across?    The Processor Expert generates some c files and header files for stuff like DDR and SerDes.   Do these import into the flexbuilder framework?  

Thanks.

**********************************************************************

re/atf$ flex-builder -c atf -m neosem_hp_ibir -b qspi
COMPONENT: atf
MACHINE: neosem_hp_ibir
BOOTTYPE: qspi
make: Entering directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012'
make[1]: Entering directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012/packages/firmware'

Building ATF ...
swithing to LSDK-20.12 ...
warning: refname 'LSDK-20.12' is ambiguous.
Switched to branch 'LSDK-20.12'
make[2]: Entering directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012/packages/firmware/atf'
REALCLEAN
make[2]: Leaving directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012/packages/firmware/atf'
neosem_hp_ibir is not supported!
make[1]: Leaving directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012/packages/firmware'
make: Leaving directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012'

**********************************************************************

0 Kudos

656 Views
smiller2
Contributor III

I found the reason for the error running "flex-builder -c atf -m neosem_hp_ibir -b qspi"    The reason this build failed was because I did not have a manifest file.    Apparently that is required even to build just this first part of the QSPI flash. 

So the open questions are just about how to transfer from the output files generated by CodeWarrior into the FlexBuilder  code base. 

Thanks.

0 Kudos

652 Views
yipingwang
NXP TechSupport
NXP TechSupport

You have to modify rcw_1600_qspiboot.rcw in flex-builder manually one value by one value.

0 Kudos