Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
loop_y0u
Level 4
Level 4
25 replies posted 50 sign-ins 10 questions asked

Hi Community, Simple Question : 

I have a .cyacd file and currently looking at Bootloader Host code to understand how it takes all the data into the Packets and transmit it one by one. I opened the .cyacd file in Notepad++ and saw Hex values. But the cyacd format contains the ASCII ?

0 Likes
1 Solution
Rohan_M
Moderator
Moderator
Moderator
50 solutions authored 25 likes received 250 sign-ins

Hi @loop_y0u ,

CyBtldr_ProgressUpdate(uint8_t arrayId, uint16_t rowNum) is declared in cybtldr_api2.h. And You can define this function anywhere as per your choice. This function is called in every functions of cybtldr_api2.c (as mentioned by you update()). This function will have the  values of aaryid and rowNum. In this function (update()), you can maybe check the value of aaryid and rowNum and check the progress of file parsing by printing these value.
 
To answer your second question, I don't think it is required to verify '\r' or '\n', crc is calculated row by row. Please refer to CyBtldr_ComputChecksum32bit() or CyBtldr_ComputChecksum16bit() API in tcybtldr_command.c for more information.
 
Let me know if you've more queries.
 
Regards,
Rohan

View solution in original post

0 Likes
3 Replies
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @loop_y0u 

When a bootloadable project is built, an additional file of type .cyacd (application code and data) is also
generated. This file contains a header followed by lines of flash data. Excluding the header, each line in the file
represents an entire row of flash data. The data is stored as ASCII data in big-endian format. Hence, while
bootloading, the contents of this file must be parsed (converted from ASCII to hex). So the parsed format will be in hex.

To understand the flow of communication between the host and the target during a bootloading operation please refer to the PSoC4 I2C Bootloader document section 10.1.

Thanks and Regards,
Leo

0 Likes
loop_y0u
Level 4
Level 4
25 replies posted 50 sign-ins 10 questions asked

Hi @LeoMathews ,

 

Its a great help for me. I can now clearly understand what is .cyacd file and how do I Parse it. I've an additional problem which is There is a function definition in "Cybtldr_api2.h " as typedef int CyBtldr_ProgressUpdate(arrayID, rowNum); How can i implement this logic to compute the checksum since this is the only step I didn't understood. Additionally could you please tell me if  i need to verify the CRLF or \n\ in my .cyacd file and then accordingly i can compute the checksum.

 

Thanks and Regards,, 

Fromwhere Developer

 

0 Likes
Rohan_M
Moderator
Moderator
Moderator
50 solutions authored 25 likes received 250 sign-ins

Hi @loop_y0u ,

CyBtldr_ProgressUpdate(uint8_t arrayId, uint16_t rowNum) is declared in cybtldr_api2.h. And You can define this function anywhere as per your choice. This function is called in every functions of cybtldr_api2.c (as mentioned by you update()). This function will have the  values of aaryid and rowNum. In this function (update()), you can maybe check the value of aaryid and rowNum and check the progress of file parsing by printing these value.
 
To answer your second question, I don't think it is required to verify '\r' or '\n', crc is calculated row by row. Please refer to CyBtldr_ComputChecksum32bit() or CyBtldr_ComputChecksum16bit() API in tcybtldr_command.c for more information.
 
Let me know if you've more queries.
 
Regards,
Rohan
0 Likes