From the implementation of corebld, we can see that corebld itself does not Code This is similar to running in a core. Program Different. This requires that when compiling a program to be run in the B-core, the linker must set the location of the code of each section in the absolute address space. To achieve this goal, you must specify the location of the target code through the LDs file when writing the B-core program.
The following code is the content in user/blkfin-apps/corebld/coreb. LDS. When linking the B-core program, you can modify the makefile to link the file. Include bf561.lds Phdrs { Text pt_load; Data pt_load; BSS pt_load; } Sections { Entry (start) . = Sizeof_headers; . Text: {. = align (4); * (. Text)}> mem_l1_code_a: Text . Data: {. = align (4); * (. Data)}> mem_l1_data_a: Data . BSS: {. = align (4); * (. BSS) . = Align (4); _ stack_bottom = .; . = 0x1000; _ stack_top = .; }> Mem_l1_data_ B: BSS } For the compilation of the main program, refer to user/blkfin-apps/corebld/coreb. s and modify one of the jump commands as needed: . Global _ real_start; _ Real_start: /* Enable interrupts */ [-- Sp] = reti; R0 = [Sp ++]; /* Disable watchdog */ CMDL = (wdogb_ctl & 0 xFFFF ); Export H = (wdogb_ctl> 16 ); R0 = (0xad <4) | (0x3 <1) (z ); W [P0] = R0; // Insert a jump command here Do_nothing: Idle; Jump do_nothing;