For the bootloadable component how do I set the CYDEV_PROJ_TYPE to CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JoSa_3786491
Level 3
Level 3
First like received First like given

I'd like to be able to use Bootloadable_1_SetActiveApplication()

But my current project is missing some settings that I don't know where to set.

What does it take to get a project to set the CYDEV_PROJ_TYPE to CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER?

Is it some project setting, am I missing a setting on the bootloadable component?

Any help would be appreciated.

This is a excerpt from Bootloadable_1.h

/*******************************************************************************

* API prototypes

*******************************************************************************/

#if (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER)               

    uint8 Bootloadable_1_GetActiveApplication(void) CYSMALL \

          ;

    cystatus Bootloadable_1_SetActiveApplication(uint8 appId) CYSMALL \

             ;

#endif  /* (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER)*/

0 Likes
1 Solution
JoSa_3786491
Level 3
Level 3
First like received First like given

I sort of figured it out. I need three projects.

Projects

======

1. Bootloader

  • Bootloader (Dual-application bootloader checked)
  • Communication Device (USBFS)

2. Application 0

  • Bootloader (Dual-application bootloader unchecked)
  • Communication Device (USBFS)
  • Bootloadable (Manual application image placement checked and the Placement address set to after the bootloader length)

2. Application 1

  • Bootloader (Dual-application bootloader unchecked)
  • Communication Device (USBFS)
  • Bootloadable (Manual application image placement checked and the Placement address set to after application 0)

It compiles for me just fine and it will run Application 0 just fine. But when I

Bootloader_Exit(Bootloader_EXIT_TO_BTLDB_2);

It just runs application 0 instead of application 1. Any ideas?

One clue is when I switch to application 1 I do this

Bootloadable_1_SetActiveApplication(1);

Bootloadable_1_Load();

after that it loads into the bootloader and I call

BL_Start();

This causes hang so I tried Bootloader_Exit(Bootloader_EXIT_TO_BTLDB_2); which as I mentioned above runs the wrong application.

Something is wrong with Application 1 but I don't know what. My guess is some verification is failing and that why it's not loading.

View solution in original post

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

No needto explicitly set that value. Just put a bootloader or a bootloadable component onto the schematic and configure it accordingly.

Bob

0 Likes
JoSa_3786491
Level 3
Level 3
First like received First like given

I sort of figured it out. I need three projects.

Projects

======

1. Bootloader

  • Bootloader (Dual-application bootloader checked)
  • Communication Device (USBFS)

2. Application 0

  • Bootloader (Dual-application bootloader unchecked)
  • Communication Device (USBFS)
  • Bootloadable (Manual application image placement checked and the Placement address set to after the bootloader length)

2. Application 1

  • Bootloader (Dual-application bootloader unchecked)
  • Communication Device (USBFS)
  • Bootloadable (Manual application image placement checked and the Placement address set to after application 0)

It compiles for me just fine and it will run Application 0 just fine. But when I

Bootloader_Exit(Bootloader_EXIT_TO_BTLDB_2);

It just runs application 0 instead of application 1. Any ideas?

One clue is when I switch to application 1 I do this

Bootloadable_1_SetActiveApplication(1);

Bootloadable_1_Load();

after that it loads into the bootloader and I call

BL_Start();

This causes hang so I tried Bootloader_Exit(Bootloader_EXIT_TO_BTLDB_2); which as I mentioned above runs the wrong application.

Something is wrong with Application 1 but I don't know what. My guess is some verification is failing and that why it's not loading.

0 Likes