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.
Can anyone help me out with porting this code to arduino so I can bootload several PSOCS over I2C?
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%3A%22XYZ%22%7D%2C51
I can't even get the given API functions to compile on arduino, let alone get started on the comms layer!