- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's what I try:
/* `#START UART_Boot` */
#include "TxEnable.h"
/* `#end` */
cystatus UART_UartCyBtldrCommWrite(const uint8 pData[], uint16 size, uint16 * count, uint8 timeOut)
{
cystatus status;
status = CYRET_BAD_PARAM;
if ((NULL != pData) && (size > 0u))
{
/* `#START UART_Boot` */
TxEnable_Write(1);
CyDelayUs(5);
/* `#end` */
/* Transmit data. This function does not wait until data is sent. */
UART_SpiUartPutArray(pData, (uint32) size);
*count = size;
status = CYRET_SUCCESS;
if (0u != timeOut)
{
/* Suppress compiler warning */
}
/* `#START UART_Boot` */
CyDelayUs(50);
TxEnable_Write(0);
/* `#end` */
}
return (status);
}
ON clean and build, above mods get removed and here's what gets appended to the new generated source:
/* [] END OF FILE */
#if 0 /* begin disabled code */
`#start UART_Boot` -- section removed from template
#include "TxEnable.h"
`#end`
#endif /* end disabled code */
#if 0 /* begin disabled code */
`#start UART_commwrite` -- section removed from template
CyDelayUs(50);
TxEnable_Write(0);
`#end`
#endif /* end disabled code */
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another option is to make use of the pre-build option in the IDE, and create a simple batch file or Python script or whatever you prefer which copies the modified source file(s) from some special location that you have prepared into the appropriate /Generated_Source/... subfolder for your compile architecture.
There are pros and cons to each approach, but if the component customization approach is harder or more complicated than you anticipated, you might try this instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
You can try to export and import the bootloader component to be customized component, then your own code won't be modified by build and compile.
http://www.cypress.com/training/psoc-video-tutorial-series-how-create-custom-components
http://www.cypress.com/documentation/component-datasheets/psoc-creator-component-author-guide
Thanks,
Ryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Ryan. Sounds like this is what I want to do. Will give this a shot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another option is to make use of the pre-build option in the IDE, and create a simple batch file or Python script or whatever you prefer which copies the modified source file(s) from some special location that you have prepared into the appropriate /Generated_Source/... subfolder for your compile architecture.
There are pros and cons to each approach, but if the component customization approach is harder or more complicated than you anticipated, you might try this instead.