Importing Config.C into Project for CCG2

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

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

cross mob
GrCa_1363456
Level 6
Level 6
50 likes received Beta tester First comment on KBA

How can I resolve Undefined symbol errors in an example?

I'm attempting to follow instructions of Import EZ-PD Configuration Utility C-source @ https://community.cypress.com/message/161853,

The bootloader project produces errors during build.

I started with Power Adapter example for CCG2

I added in cc_boot-pa project

I updated Components for both projects

I changed compiler in Build Settings to MDK for both projects

The following 17 errors still exist:

...

Creating archive '.\CortexM0\ARM_MDK_Generic\Debug\cc_boot-pa.a'

armlink.exe -o C:\Scratch\Try14\CYPD2134-24LQXI_power_adapter\CYPD2134-24LQXI_power_adapter.cydsn\cc_boot-pa.cydsn\CortexM0\ARM_MDK_Generic\Debug\cc_boot-pa.elf .\CortexM0\ARM_MDK_Generic\Debug\main.o .\CortexM0\ARM_MDK_Generic\Debug\usbpd_config.o .\CortexM0\ARM_MDK_Generic\Debug\cyfitter_cfg.o .\CortexM0\ARM_MDK_Generic\Debug\cymetadata.o .\CortexM0\ARM_MDK_Generic\Debug\Cm0Start.o .\CortexM0\ARM_MDK_Generic\Debug\cc_boot-pa.a --cpu=Cortex-M0 --diag_style=gnu --no_startup --library_type=microlib --map --list .\CortexM0\ARM_MDK_Generic\Debug/cc_boot-pa.map --scatter Generated_Source\PSoC4\Cm0RealView.scat --keep=Bootloader_1_Checksum --keep=Bootloader_1_SizeBytes --no_debug

ERROR: L6218E: Undefined symbol boot_jump_to_fw (referred from main.o).

ERROR: L6218E: Undefined symbol boot_start (referred from main.o).

ERROR: L6218E: Undefined symbol get_psource_ops (referred from main.o).

ERROR: L6218E: Undefined symbol load_sys_info (referred from main.o).

ERROR: L6218E: Undefined symbol pe_register_psupply_ops (referred from main.o).

ERROR: L6218E: Undefined symbol pe_state_machine (referred from main.o).

ERROR: L6218E: Undefined symbol system_init (referred from main.o).

ERROR: L6218E: Undefined symbol timer_init (referred from main.o).

ERROR: L6218E: Undefined symbol timer_start (referred from main.o).

ERROR: L6218E: Undefined symbol type_c_init (referred from main.o).

ERROR: L6218E: Undefined symbol type_c_state_machine (referred from main.o).

ERROR: L6218E: Undefined symbol typec_register_psupply_ops (referred from main.o).

ERROR: L6218E: Undefined symbol CyBtldrCommRead (referred from Bootloader_1.o).

ERROR: L6218E: Undefined symbol CyBtldrCommStart (referred from Bootloader_1.o).

ERROR: L6218E: Undefined symbol CyBtldrCommStop (referred from Bootloader_1.o).

ERROR: L6218E: Undefined symbol CyBtldrCommWrite (referred from Bootloader_1.o).

Finished: 0 information, 0 warning and 16 error messages.

The command 'armlink.exe' failed with exit code '1'.

--------------- Rebuild Failed: 05/04/2020 07:06:38 ---------------

0 Likes
1 Solution
GrCa_1363456
Level 6
Level 6
50 likes received Beta tester First comment on KBA

I realize CCG2 is a special case. The example projects for CCG2 were created with the config.c file in the Bootloader and written for PSoC Creator 3.3. The following steps seem to work. If there's a cleaner way, please share.

A. Create Configuration using “EZ-PD Configuration Utility”

Reference Section 2.1.2 in Cypress EZ-PD Configuration Utility User Manual

    1. .XML file is format for Configuration Utility to read back the file
    2. CYACD file can be programmed into device to set configuration
    3. .C file can be imported into CCGx SDK

B. Create Project in PSoC Creator version 3.3 (I’m having issues with newer versions of PSoC Creator)

  1. Select CYPD2134-24LQXI_power_adapter code example
  2. For CYPD2134-24LQXI_power_adapter: Change Compiler: Project > Build Settings > Toolchain = ARM MDK Generic
  3. Right-Click on Workspace then Add > Existing Project
    1. navigate to CYPD2134-24LQXI_power_adapter.cydsn > cc_boot-pa.cydsn then find cc_boot-pa.cyprj
  4. Leave Compiler as ARM GCC 4.9-2015-q1-update for cc_boot-pa project.
  5. Add Toolchain: Tools > Options > Project Management > ARM GCC Generic: C:\Keil_v5\ARM\ARMCC\bin
  6. Add Toolchain: Tools > Options > Project Management > ARM MDK Generic: C:\Keil_v5\ARM\ARMCC\bin
  7. Clean and Build

Reference:

View solution in original post

0 Likes
2 Replies
GrCa_1363456
Level 6
Level 6
50 likes received Beta tester First comment on KBA

I realize CCG2 is a special case. The example projects for CCG2 were created with the config.c file in the Bootloader and written for PSoC Creator 3.3. The following steps seem to work. If there's a cleaner way, please share.

A. Create Configuration using “EZ-PD Configuration Utility”

Reference Section 2.1.2 in Cypress EZ-PD Configuration Utility User Manual

    1. .XML file is format for Configuration Utility to read back the file
    2. CYACD file can be programmed into device to set configuration
    3. .C file can be imported into CCGx SDK

B. Create Project in PSoC Creator version 3.3 (I’m having issues with newer versions of PSoC Creator)

  1. Select CYPD2134-24LQXI_power_adapter code example
  2. For CYPD2134-24LQXI_power_adapter: Change Compiler: Project > Build Settings > Toolchain = ARM MDK Generic
  3. Right-Click on Workspace then Add > Existing Project
    1. navigate to CYPD2134-24LQXI_power_adapter.cydsn > cc_boot-pa.cydsn then find cc_boot-pa.cyprj
  4. Leave Compiler as ARM GCC 4.9-2015-q1-update for cc_boot-pa project.
  5. Add Toolchain: Tools > Options > Project Management > ARM GCC Generic: C:\Keil_v5\ARM\ARMCC\bin
  6. Add Toolchain: Tools > Options > Project Management > ARM MDK Generic: C:\Keil_v5\ARM\ARMCC\bin
  7. Clean and Build

Reference:

0 Likes

Hi Greg,

Your process is absolutely correct.

The MDK needs add into Tool Chain pf application at first time to build the firmware project with MDK compiler. The process is below in the CCG2 user guide.

pastedImage_0.png

Best Regards,

Lisa