PSoC™ Creator & Designer Forum Discussions
I am trying to create a custom UDB component in PSoC Creator 4.1 Update 1. Everything works until I add a control register block into the UDB schematic. When I try to compile the project I get the following error message:
--------------- Build Started: 09/20/2017 19:06:17 Project: udb_test, Configuration: ARM GCC 5.4-2016-q2-update Debug ---------------
The code generation step is up to date.
arm-none-eabi-gcc.exe -mcpu=cortex-m3 -mthumb -I. -IGenerated_Source\PSoC5 -Wa,-alh=.\CortexM3\ARM_GCC_541\Debug/cic_1_CtrlReg.lst -g -D DEBUG -D CY_CORE_ID=0 -Wall -ffunction-sections -ffat-lto-objects -Og -c Generated_Source\PSoC5\cic_1_CtrlReg.c -o .\CortexM3\ARM_GCC_541\Debug\cic_1_CtrlReg.o
In file included from Generated_Source\PSoC5\cic_1_CtrlReg.c:17:0:
Generated_Source\PSoC5\cic_1_CtrlReg.c: In function 'cic_1_CtrlReg_Write':
Generated_Source\PSoC5\cic_1_CtrlReg.h:61:50: error: 'cic_1_CtrlReg_Sync_ctrl_reg__CONTROL_REG' undeclared (first use in this function)
#define cic_1_CtrlReg_Control (* (reg8 *) cic_1_CtrlReg_Sync_ctrl_reg__CONTROL_REG )
^
Generated_Source\PSoC5\cic_1_CtrlReg.c:39:5: note: in expansion of macro 'cic_1_CtrlReg_Control'
cic_1_CtrlReg_Control = control;
^
Generated_Source\PSoC5\cic_1_CtrlReg.h:61:50: note: each undeclared identifier is reported only once for each function it appears in
#define cic_1_CtrlReg_Control (* (reg8 *) cic_1_CtrlReg_Sync_ctrl_reg__CONTROL_REG )
^
Generated_Source\PSoC5\cic_1_CtrlReg.c:39:5: note: in expansion of macro 'cic_1_CtrlReg_Control'
cic_1_CtrlReg_Control = control;
^
Generated_Source\PSoC5\cic_1_CtrlReg.c: In function 'cic_1_CtrlReg_Read':
Generated_Source\PSoC5\cic_1_CtrlReg.h:61:50: error: 'cic_1_CtrlReg_Sync_ctrl_reg__CONTROL_REG' undeclared (first use in this function)
#define cic_1_CtrlReg_Control (* (reg8 *) cic_1_CtrlReg_Sync_ctrl_reg__CONTROL_REG )
^
Generated_Source\PSoC5\cic_1_CtrlReg.c:59:12: note: in expansion of macro 'cic_1_CtrlReg_Control'
return cic_1_CtrlReg_Control;
^
Generated_Source\PSoC5\cic_1_CtrlReg.c:60:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
--------------- Build Failed: 09/20/2017 19:06:17 ---------------
It appears that the Control Register address is not defined. It is not externed in the .h file, therefore it has to be included in one of the two include files:
cyfitter.h or cytypes.h (which it isn't).
So where should this register be declared?
Show LessI recently purchased the CY8CKIT-024 and CY8CKIT-042 in order to test the capacitive proximity sensing. I used the PSoC programmer to upload the hex file "Proximity_Distance_042.hex". I know this works because as a bring my hand closer to the shield the brightness of the LEDs increases. The guide for the CY8CKIT-024 says I should be able to view the sensor data using the bridge control panel. I open the "Proximity_Distance.iic" file in the bridge control panel, then I go to chart->variable settings and load the "Proximity_Distance" configuration file. Then I plug in my PSoC 4 Pioneer kit into the computer via the USB cable. The bridge control panel automatically detects this and connects to "COM4". Then I move the cursor to the line I want to run on repeat and nothing happens. I try connecting to the device through KitProg instead of "COM4" but when I click Send or Repeat I get "SWD_ReadData() is not supported by this Programmer!".
Essentially I want to view the capacitive sensor data on my computer with the development kit that should have been plug and play. Any assistance in getting this working is appreciated. Thank you.
Show LessWhen trying to use Python_Ex.py
(in Cypress\Programmer\Examples\Programming\PSoC3_5\SWD\Python_Ex)
I get errors such as Cypress\Programmer\Examples\Programming\PSoC3_5\SWD\Python_Ex
In fact, when checking the relevant lines with:
hResult = pp.DAP_GetJtagID()
chipJtagID = hResult[1]
chipJtagID[0]
it turns out that chipJtagID behaves like a list of integers and not characters,
so all the uses of ord() in Is_PSoC5_TM_ID, etc.
need to be removed.
This is not an urgent problem, and there are probably only few users who use python for PSoC programming.
I did the changes locally, so I do not create an issue.
Andreas
Show LessJust a quick heads up for everyone. (Are you listening Cypress?)
There are 2 serious bugs in the Emulated EEPROM component which make it not suitable for use in any application.
It has to do with the way the internal addresses within the flash arrays are calculated. The user has no control over these and a work around is only possible by editing the generated-source or modifying the supplied library source.
1. If the constant structure, variable or array you have defined just happens to live outside of flash array-0 then writing to it will corrupt other areas of flash. The data will get saved to the wrong flash array and could overwrite code, or configuration data.
2. If the data you are storing in flash just happens to occupy part of the last row of a flash array (again you have no control over this) then the last row will be written to the wrong flash array, which could damage code or configuration data.
I have raised tickets with Cypress for both of these issues. I have given them sample code which demonstrates the issues and I am sure a fix will be forth coming, but until then you canot use the Emulated EEPROM component.
If you are currently using this component and not suffering any bad effects, then it is only by chance - a small change to ANY part of your code could push your flash data into one of the affected areas and cause your code to behave in strange ways.
For those on PSoC 5 or PSoC 5LP here is a work around:
After you code is built and compiled, find the generated source for the Em_EEPROM_Write() method. [Its name will depend on what you names the component in the schematic, for example if your component is named 'FlashSave' then the method will be FlashSave_Write() ]
Then edit the four lines at approximately line 121 in the file and replace them with this:
rowNumber = dataAddress / CY_FLASH_SIZEOF_ROW;
arrayNumber = dataAddress / CY_FLASH_SIZEOF_ARRAY;
rowOffset = dataAddress - (CY_FLASH_SIZEOF_ROW * rowNumber);
readSrcIndex = 0u;
And then add this line immediately following the previous four:
rowNumber &= 0x000000ff;
This will allow the rowNumber and arrayNumber to be calculated properly for any address in flash.
I hope this helps.
Show LessHi All,
I have configured my device as shown below but unable to get any status register updates or IRQ . Please give us working configuration data.
Can we poll the status registers or Debug Sensor registers - will the device respond properly in polling mode?
We are able to check the CRC, family ID, device ID etc. which are correct so not doubting our I2C communication.
Show Less
Hi all,
I want to know if CY8CMBR3106S, or any other IC of this family can sens more than one pad at the time.
if not, can I use a few of this ICs in parallel and use them (by scanning one after the other) as a multitouch system?
any ideas?
10X
Show LessIt looks like when I go into debug, the EEPROM is cleared.
This doesn't happen if I just program the part.
Is there a setting for DEBUG to not clear the eeprom contents?
Thanks.
Show LessHi.
In my code there are various computations. Some of them use constants, defined as fractions. For example
#define CONST_1 (9 / 2)
void Func1(void)
{
var1 = var2 * CONST_1 + 30;
}
Does the compiler compute the CONST_1 fraction and use the result as multiplication constant, or the CPU executes the full computation (i.e. multiplying by 9 and dividing by 2) every time the function is called?
Thanks.
Show LessI'd like to know if there is a way to manage multiple hardware targets in PSoC Creator?
i.e. without having to duplicate the full project, I'd like to:
1) re-use the same code & schematic but have different pin-mapping configs.
2) build for multiple target-cpu's (within the same psoc-family), preferably using the same binary.
example: I'd like to run the same code on both the main 5LP on a CY8KIT-059 & the KitProg CPU. Since they are slightly different, the boot-loader will not accept this. So I'd like to know if there is a way around the explicit cpu-definition in the bootloader component.
Thanks David
Show LessI have the newest Creator (4.1.0.3210) but an old Timer (2.7). I can not use a Project from my colleague, because there is an Timer 2.8 implemented and my Creator does not have the newest version. Whats wrong?
Show Less