Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Ethernet Bootloader -> PSOC 5 -> Problem starting Userapp
Moderator:
ANCY

Post Reply
Follow this topic



Ethernet Bootloader -> PSOC 5 -> Problem starting Userapp

MasterJings posted on 30 Oct 2012 2:42 AM PST
Member
8 Forum Posts

Dear community,

I'm trying to write a ethernet bootloader. Thanks to Bob Marlowe, I was able to flash the PSOC5 successfully ;).

Now I flashed a "blinky led"-program using the ethernet bootloader, but unfortunately, it doesn't "run".

Attached is the blinky led, which works as a standalone program (starting @0x00000000). Afterwards I changed in the linker script (cm3gcc.ld) the following lines, as the bootable app start's at 0x6400 in flash. (but before generated the project)

Line 25: rom (rx) : ORIGIN = 0x6400, LENGTH = (262144 - 0x6400)

Line 65: ASSERT(0x6400 + . <= 0x10000 || !1, "DMA Init must be within the first 64k of flash");

- and compiled it.

According to the generated hexfile, the stackpointer is 0x20008000 and the start-addr of the app is 0x6679   (Line 401 of the hexfile::"406400000080002079660000ED700000ED700000E...."

.....after the "burning" of the flash is done, I start the blinky-led app as follows:

.....

LaunchApp(0x6400);

.....

void LaunchApp(uint32 appAddr)
{
    void (*app_entry)(void);

    uint32 *stack = appAddr;
    uint32 *app_start = appAddr + 4;
   
    CY_SET_REG32(CYDEV_NVIC_VECT_OFFSET, (appAddr & 0x1FFFFF80));

    __set_MSP(*stack);
   
    app_entry = (void (*)(void))(*app_start);

--> "put break point here"
    app_entry();

}

Debugging the bootloader at the break point, it reads the right values!

The starting of the program is "0x6679", which is odd, and therefore the PSOC expects Thumb2 instruction, which is accurate. Stackpointer is 0x20008000, which is ok!

I'm playing around for 3 days, trying and reading "everything" of the startup process on PSOC 5, but it seems to be easier, to accomplish such a task on a LPC1768 ;(.

Probably some of you, know the answer, or has a hint :)

Bye

Jings







ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20