Hi, I have modified NOR ICE V1 boot loader program for beagle bone black and have been able successfully load the boot loader but I fail to load the application program in the NOR Flash. My application code is a simple gpioLEDBlink.c program where pin 23 of GPIO1 glows alternately
I create the Boot loader .bin using the given command:- (Do i need to rename it the .bin as boot.bin only before flashing????)
E:\SDK\am335x_sysbios_ind_sdk_1.1.0.8\sdk\tools\post_build\post_build.bat "C:\ti\ccsv6" "C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.2" "E:\SDK\am335x_sysbios_ind_sdk_1.1.0.8\sdk\starterware\binary\armv7a\cgt_ccs\am335x\evmAM335x\bootloader\NOR" "boot" "E:\SDK\am335x_sysbios_ind_sdk_1.1.0.8\sdk\tools\isdk_image" "0" "2" "0x08000000" "0x08000000"
I create the Application loader .bin using following command:- (Do i need to rename it the .bin as appl.bin only before flashing????)
C:\ti\am335x_sysbios_ind_sdk_1.1.0.8\sdk\tools\post_build\post_build.bat "C:\ti\ccsv6" "C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.2" "C:\ti\AM335X_StarterWare_02_00_01_01\binary\armv7a\cgt_ccs\am335x\beaglebone\gpio\Release" "gpioLEDBlink" "C:\ti\am335x_sysbios_ind_sdk_1.1.0.8\sdk\tools\isdk_image" "1" "2" "0x08003D00" "0x08003D00"
My Nor boot.cmd is as follows (I have given the length as 0X3D00 only):-
-l drivers.lib
-l platform.lib
-l utils.lib
-l libmmcsd.lib
/* SPECIFY THE SYSTEM MEMORY MAP */
MEMORY
{
NOR_MEM : org = 0x08000000 len = 0x3D00 // 0x10000 changed /* RAM */
IRAM_MEM : org = 0x402F0400 len = 0x1FBFF /* RAM */
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
.init : {
bl_init.obj (.text)
} load > 0x08000000
.const : load > NOR_MEM /* GLOBAL CONSTANTS */
.cinit : load > NOR_MEM
.text : load > NOR_MEM /* CODE */
.ram_code: { bl_norexec.obj(.text)} load > NOR_MEM, run > 0x40300000
LOAD_START(ram_code_load_start)
RUN_START(ram_code_run_start)
SIZE(ram_code_size)
.data : load > IRAM_MEM /* INITIALIZED GLOBAL AND STATIC VARIABLES. */
.bss : load > IRAM_MEM /* UNINITIALIZED OR ZERO INITIALIZED */
/* GLOBAL & STATIC VARIABLES. */
RUN_START(bss_start)
RUN_END(bss_end)
.stack : load > 0x4030FF00 /* SOFTWARE SYSTEM STACK */
}
I have glown LED 1 in the boot loader to understand that my boot loader has loaded successfully and it glows..
Finally my entry point in the Application code is as follows:-
unsigned int sector;
void (*appEntryNOR)();
ti_header t_header;
pinmux_NOR();
////////////////////////////////////////////////////////////////////////////
t_header.magic_number = 0x00000000;
t_header.image_size = 0x00000000;
t_header.load_addr = 0x00000000;
t_header.run_addr = 0x08003D00;
appEntryNOR = (void (*)(void)) t_header.run_addr;
(*appEntryNOR)( );
I do not knwo where I am making a mistake. Please help in this at the earliest... Thanks...