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

PSoC™ 5, 3 & 1 Forum Discussions

Anonymous
Not applicable

I am a bit confused.

In AN68272, Bootloader_utils_nativeCode.cs line 82 <importing CyBtldr_Program has 3 parameters),

   but  cybtldr_api2.h line 89 (_Program needs 4 parameters) -- There is an extra securitykey parameter.

Is An68272 out of sync?

Appreciate any insight.

0 Likes
1 Solution
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

The Application Note example project is an old project and does not have the security key feature of the bootloader component. Also the .dll used is an old version which does not need security key as the argument. However the application note AN73503 - PSoC® USB HID Bootloader | Cypress Semiconductor has this feature implemented. While creating a new host app from scratch then you should use the security ID also in the argument.Thank you for pointing this out.

Thanks,

Hima

View solution in original post

0 Likes
8 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Line 89 in cybtldr_api2.h has this function "EXTERN int CALL_CON CyBtldr_Program(const char* file, const uint8_t* securityKey, uint8_t appId, CyBtldr_CommunicationsData* comm, CyBtldr_ProgressUpdate* update);" which has 5 parameters

And cybtldr_api.h has "EXTERN int CyBtldr_ProgramRow(uint8_t arrayID, uint16_t rowNum, uint8_t* buf, uint16_t size);" has 4 parameters

cybtldr_api2.c/.h::This is a higher level API that handles the entire bootload operation. It has functions to open and close files. It invokes the functions of the cybtldr_api.c / .h API for the bootload operations

cybtldr_api.c /.h ::This is a low-level API file for sending a single row of data at a time to the bootloader target.

0 Likes
Anonymous
Not applicable

I think I understand the calls in the APi.

The issue is more with the c# code sample Cypress provides which does not send the security key, and I don't see an overloaded definition for it.

I am very weak in C# to start with - so it doesn't help that the sample code has to be so complicated.

Giri

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

The Application Note example project is an old project and does not have the security key feature of the bootloader component. Also the .dll used is an old version which does not need security key as the argument. However the application note AN73503 - PSoC® USB HID Bootloader | Cypress Semiconductor has this feature implemented. While creating a new host app from scratch then you should use the security ID also in the argument.Thank you for pointing this out.

Thanks,

Hima

0 Likes
Anonymous
Not applicable

Thank you.

I will look at the AN73503.

0 Likes
Anonymous
Not applicable

Actually a follow .

Is the DLL used withi this appnote created using the *.c and *.h files that are installed with Creator 4.1 in

..\PSoC Creator\4.1\PSoC Creator\cybootloaderutils ?

0 Likes

No the .dll might not be same as the 4.2 version. However there are no major changes in the cybootloaderutils library for the 4.2 version. You can use the same implementation.

Thanks,

Hima

0 Likes
Anonymous
Not applicable

Can anyone help me out with porting this code to arduino so I can bootload several PSOCS over I2C?

0 Likes
Anonymous
Not applicable

How did you even get this far?
I've been trying to follow the guide given at the end of this document... http://www.cypress.com/file/137036/download#%5B%7B%22num%22%3A73%2C%22gen%22%3A0%7D%2C%7B%22name%22%...

I can't even get the given API functions to compile on arduino, let alone get started on the comms layer!