PSoC™ Creator & Designer Forum Discussions
Hello all,
as in my previous post, I am currently trying to refactor my source code.
For example, I have two apps in my main function that do two different tasks and each access the same headers, variables, etc. I'm trying to rewrite my source code.
In the main function, one app or the other is started on the basis of a #defines NORMAL_MODE.
#include "main.h"
/* Function Prototypes */
void SysTickISRCallback(void);
CY_ISR_PROTO(Timer_Int_Handler);
CY_ISR_PROTO(uart_int_Handler);
void app_main(void);
//void app_kalbirierfahrt(void);
int main()
{
/* Start SCB (UART mode) operation 3*/
UART_Start();
Timer_Int_StartEx(Timer_Int_Handler);
Timer_Start();
uart_int_StartEx(uart_int_Handler);
while(1){
#ifdef NORMAL_MODE
app_main();
#else
app_kalibrierfahrt();
#endif
}
}
If I now try to compile the project, then logically errors occurs, as some variables have multiple definitions etc.
.\CortexM0p\ARM_GCC_541\Debug\app_calibration_drive.o:(.bss+0x4): multiple definition of `command_receive'
.\CortexM0p\ARM_GCC_541\Debug\main.o:(.bss+0x4): first defined here
.\CortexM0p\ARM_GCC_541\Debug\app_calibration_drive.o:(.bss+0x5): multiple definition of 'runflag'
.\CortexM0p\ARM_GCC_541\Debug\main.o:(.bss+0x5): first defined here
etc.
What is the best way to handle this? I would like to pass a hardware argument when compiling that it should compile either the App_a or the App_b and exclude the other source file. But I don't know how to do that. Is it possible to add user commands in the "Build Settings" under the ARM GCC option to exclude one source file, when I am building the project?
Best Regards
Michael
Show Less
Hi, I'm beggineer in psoc.
I've been trying to make sure the ultrasonic sensor works, without using CyDelay and using interrupts, but it doesn't work correctly, any help? I'm using Cy8ckit-050.
#include "project.h"
uint16 cuenta,i;
float distancia=0.0;
CY_ISR(ISR_ECHO){ //
echo_ClearInterrupt();
if(echo_Read()==1){
Timer_Start();
}
else if(echo_Read()==0){
i=Timer_ReadCounter();//
cuenta=65535-i;//
distancia=cuenta/58.0;//Calculate Distance
Timer_Stop();//Stop Timer
Timer_ReadStatusRegister();//Reset Timer
}
}
int main(void)
{
ISR_echo_StartEx(ISR_ECHO);
CyGlobalIntEnable;
PWM_Start();
Salida_Write(0);// Off LED
for(;;)
{
if(distancia<10.0){
Salida_Write(1);// On LED
}
else{
Salida_Write(0);// Off LED
}
}
}
Hi,
I'm debugging a project using PSoC Creator 4.4 and Mini prog4 and something is wrong.
for example:
if (buffer [0] == 0x0A && buffer [1] == 0x0B)
{
// Inserting a breakpoint here and adding to watch the buffer the data is different from 0x0A and 0x0B
}
Any idea?
Thanks
Show Less
Hi Community, I'm actually facing an issue where my Flash memory gets Corrupted and the Functions stops even working. I've a CapSense application where The LED Powers up and functions according to the touch. But after sometime This completely gets Off. Even after powering it, The LED Doesn't even glow and in result "I flash it again" which in result works for a short time. Is it Really a Flash Memory issue ?
:: I'm using Cypress CY8C4245AXI-483 Chip
Show LessHello all,
I'm trying to restructure my source code and I saw on youtube by Gene Schroeder tech(https://www.youtube.com/watch?v=9ArM4GWNxVQ&list=PL4cGeWgaBTe155QQSQ72DksLIjBn5Jn2Z&index=16) the video series about embedded programming and I like the idea with the app function which runs in a super loop. Background is that I would like to have for example app A and app B with different tasks, for example a demo mode and a normal mode etc..
I have created a project with PSoC Creator and adopted the structure. I added the include folder under build settings. It works if I remove the delay function. But if I want to use for example the cyDelay(500) function, the following error appears, although "project.h" and "CyLib.h" are included :
..\Pioneer Kit\mcu-class-1-gene_schroeder\mcu-class\SuperLoop_Example.cydsn/AppB/app_mainB.c:19: undefined reference to 'cyDelay'.
collect2.exe: error: ld returned 1 exit status
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
What is the reason? Why can't it find the delay function? I don't want to use the function anyway so I don't block the superloop, but if I needed it still, it would be good if it worked.
Best Regards
Michael
Show LessLooked online for quite a while. It was a bit frustrating because everything seemed to be in order with my installation, dependencies, updates, etc.
So, I happened to be on a laptop with a USB keyboard & mouse.
I unplugged them, and it worked. I was able to repeat the issue numerous time for verification.
I thought I would pass this info along in case it helps someone else.
PS. How about a legit dark theme for the IDE...?
Show LessHello,
since Few days I'm having a Problem with MINIPROG 4.
PSoC Creator 4.4 (running on Windows 11) is not able to Acquire the Port.
I've tried to reinstall PSoC Creator.
Once reinstalled, Miniprog 4 is recognized on the first launch of the program.
If I exit and reopen PSoC Creator, I face the problem in figure here below.
If I try Kit prog 3 , it works fine.
Is there any solution?
Thanks,
Alfonso
Show Less
Hi,
I have searched the Cypress site, but I can't find BootloaderHost as a stand alone download.
I was hoping that it was available stand alone, since I don't really want my field engineers to have to have complete versions of PSoC Creator installed just so they can do field upgrades of firmware.
Does anyone know if/where BoorloaderHost can be downloaded or if it can be installed without PSoC Creator?
Many thanks.
Kenny
Show Less2 or 3 times per day I get a crash in PSOC Creator 4.2.
Note that I also have Visual Studio running because I'm working on an application using both C# and PSOC-C
PSoc Creator just shuts down fast (without any message) while I am working within Visual Studio. Files are not saved. The only Clue I have is a Windows Event :
In Windows Events I see the following details :
Faulting application name: psoc_creator.exe, version: 0.0.0.0, time stamp: 0x5f762406
Faulting module name: ucrtbase.dll, version: 10.0.19041.789, time stamp: 0x82dc99a2
Exception code: 0xc0000409
Fault offset: 0x0009eddb
Faulting process ID: 0x2570
Faulting application start time: 0x01d9aa517c0c3bb6
Faulting application path: C:\Program Files (x86)\Cypress\PSoC Creator\4.4\PSoC Creator\bin\psoc_creator.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report ID: c1c8dabc-c7b1-46f6-8006-526e429bc944
Faulting package full name:
Faulting package-relative application ID:
Updating to PSOC Creator 4.4 does not solve this problem
I found this forum entry from 2020 [KBA226098] which mentions the problem not giving a solution or workaround :
Does anyone have more information on this ?
Maybe @Rakshith ?
Thanks - Patrick
[Edit: Added Clue information]
Show LessIs this the correct forum for PSoC Programmer issues?