- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Setup: PSoC Creator 4.4, PDL 3.1.5, CY8KIT-062-BLE
I am using PDL 3.1.5 and am trying to get CE220960 working as the first step in implementing OTA DFU in my project, but I have been having a lot of trouble with it. Right now the issue I'm stuck on is an overlapping sections error when compiling App1. Haven't seen anyone else with this issue. My process was as follows:
1. Create workspace and import DFU_BLE_Upgradable_Stack_Apps removing the parasitic "01" that PSoC Creator always tries to add to the default project names.
2. Make sure I have the correct PDL selected in Tools>Options>Project Management and in Build Settings>Peripheral Driver Library
3. Check Build Settings for all projects to make sure the correct Custom Linker Script and Post Build .bat files are referenced for CM0 and CM4 (dfu_cm0p.ld and dfu_cm4.ld).
4. Change post_build_core*.bat files to reference PDL 3.1.5 on line 11
5. Build App0 successful
6. Build App1 failed with the following error:
ERROR: section .cy_app_signature loaded at [10040ffc,10040fff] overlaps section .data loaded at [10040f90,100412e3]
collect2.exe: error: ld returned 1 exit status
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
I'm guessing this has something to do with the flash_app*_core definitions in dfu_common.ld, but I'm having trouble figuring out how the file works. It seems like there are multiple definitions of flash_app*_core variables.
Any help is greatly appreciated!
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made changes to the dfu_common.ld file which is #included in both dfu_cm0p.ld and dfu_cm4.ld. The issue is that flash_app1_core1 needs more space, so I gave it an extra 0x01000 bytes and bumped the following section down the same amount. See highlighted:
This fixed the compile error, but when I perform the actual DFU of the stack application I get the "flash row is not valid" error. If I change the dfu_common.ld file as above using PDL 3.1.2, there are no issues, so I am guessing that the fix I made is not causing the error during DFU, but there is another problem with PDL 3.1.5 working with this example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joshm ,
You are encountering this error because you are using PDL version 3.1.5, but the documentation suggests that you use PDL 3.1.2.
I encountered this same error when I used PDL 3.1.5 which I then resolved by switching the PDL version to 3.1.2.
The CE220960.pdf depicts as shown below:
Please switch to PDL version 3.1.2 for all 3 projects and rebuild the same starting with App0 project,.
This can be done in the 'Build Settings' selected by right clicking on the project:
Hope this helps.
Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @AlenAn14, I was hoping to stay with the latest libraries for my project, but if I have to, I can try moving back to 3.1.2. Do you know where I can get PDL 3.1.2? I can only find the latest 3.1.x.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joshm ,
You can get the PDL v 3.1.2 from Downloads section of the PDL Archive page .
Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Selecting the link downloads an HTML file that when runs sends you to https://itools.infineon.com/archive/PDLSetup3.1.2.exe which give you an error:
I am logged in when I initially download the html file. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apparently, you can't use Google Chrome. It worked on Edge. smh haha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is weird, I was able to download the same in google chrome using the link you shared.
Anyway, glad you were able to get the same downloaded.
Please try it out and let me know if the errors are resolved with this version of PDL.
Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using PDL 3.1.2 everything works out of the box. I would really hate to roll my project back to PDL 3.1.2 though, so I'm going to see if I can figure out what is causing the example not to work for PDL 3.1.5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I figured out what was going on with the linker file. I did not notice the line:
/* ---------- BLE Stack CM0 Start ----------
is missing the multi-line comment terminator which means there are actually no repeated definitions in the file. With that cleared up, I was able to modify the flash allocation so that there was no overlap, and all three projects compile successfully, but there is an issue replacing App1 using DFU. I am able to do the "Application only update" which is App 2, but I there is an error when executing the Application and stack update. I get the following error:
Not sure how this could be happening because the DFU update is the same application that's already on the device, so it should just fit right in where the other instalment was. I tried increasing the size of each flash region with no luck. Any idea what could be going wrong here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Forgot to record the error text to make it searchable:
Fail: The bootloader reported error "The flash row is not valid for the selected array."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joshm ,
Can you please share the change you made to the dfu_cm4.ld file to make the build successful?
Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made changes to the dfu_common.ld file which is #included in both dfu_cm0p.ld and dfu_cm4.ld. The issue is that flash_app1_core1 needs more space, so I gave it an extra 0x01000 bytes and bumped the following section down the same amount. See highlighted:
This fixed the compile error, but when I perform the actual DFU of the stack application I get the "flash row is not valid" error. If I change the dfu_common.ld file as above using PDL 3.1.2, there are no issues, so I am guessing that the fix I made is not causing the error during DFU, but there is another problem with PDL 3.1.5 working with this example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just a reminder, these changes must be made in the dfu_common.ld file for all 3 projects.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doing a diff on the PDL 3.1.2 and 3.1.5 folders it seems there is no change made to dfu, but there are a lot of changes made to the ble middleware. Makes sense that this would effect the stack App I guess, but not sure what I causing the problem. Just logging this in case it makes sense to someone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joshm
Yes, the BLE middleware has undergone a lot of changes in the PDL version 3.1.5 which could be the cause of this.
I would like to suggest you to create a new thread for this as your issues regarding the overlap errors has been resolved and your current issues is more BLE related.
Regards
Alen