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.
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.
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.
I will look at the AN73503.
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 ?
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.