Recent discussions
We're trying to create a single project template that can run on multiple machines and reference a set of common libraries without requiring manual intervention to set dozens of include paths on every machine individually. The ideal solution is to simply have each user create an environment variable with the same name that points to the library parent directory for their specific machine.
Is there a way to pass a system environment variable as an include path to the ARM-GCC compiler when it is invoked via PSoC Creator? From the command line I can just run
arm-none-eabi-gcc -I%MY_PATH% main.c
This evaluates just fine, however when invoked from within PSoC Creator MY_PATH does not get evaluated (I have verified that it does exist within the environment of the application). My guess is that it's something to do with the way in which PSoC Creator is spawning the app, it's not simply invoking a command line and it's passing the variable as a literal.
Alternatively is there a way to manually create a custom PSoC Creator build macro which does get evaluated before being passed to the compiler? (Such as ${OutputDir}, ${WorkspaceDir} etc.)
For reference setting C_INCLUDE_PATH as a system variable does work but it's not ideal as it will also pull those include directories into every other unrelated project built using any GCC version.
Show LessRolf Nooteboom helped develop a technique for writing and compiling firmware for PSOC5 on Linux and Macintosh (and Windows). The overall system uses the free VSCode from Microsoft, the ARM compiler from ARM itself, some of the Modus Toolbox work Cypress put into previous versions of ModusToolbox(tm).
The upside to his work is the entire project's build finishes in seconds on Mac or Linux vs. minutes natively. (The minutes is when building under Windows using Creator). I was able to take his work and stumble into modifying it for using a KitProg (as well as kitprog 2 or 3). The pattern for the project directory was also changed, making it easy to use as a template for future projects, and with FreeRTOS. (Yes, a complete FreeRTOS rebuild takes seconds on a Mac.)
I wrote several blog posts on this at socmaker.com. My guide for coding/compiling on Linux (which is built on the previous blogs) is at https://socmaker.com/?p=1119 . You have to create the schematic with PSOC Creator first. (I use a virtual machine running windows 7, 64 bit to accomplish this.) Then finish with the firmware development on your native O.S.
Previous posts at socmaker.com cover the Macintosh side. Enjoy
Show LessHello,
I have been using PSoC Creator 4.4 for some time now and have been unable to download the example code for some weeks now.
When I select Code Example from the File menu in PSoC Creator, all that appears is code that has already been downloaded.
I think this is probably the same cause of this problem. Please fix it ASAP.
Regards,
Shimamura
Show LessHello,
I've just downloaded the PSoC Creator 4.4 and I'm trying to build an exisiting project. However, I can't do it as PSoC Creator can't update it's components to the required versions:
My project needs cy_boot to be version 6.10, but only 6.0 is available. Also, it need cy_isr to be 1.71, but only 1.70 is available.
According to Help -> Update Manager, everything is up to date:
Here is some information about my environment, installed products etc, Help -> About:
Environment:
PSoC Creator 4.4 (4.4.0.80)
Culture: English (United States)
OS Version: Microsoft Windows NT 10.0.19043.0
CLR Version: 4.0.30319.42000
Installed CyInstaller Products:
Peripheral Driver Library 3.1.1
Peripheral Driver Library 3.1.3
Peripheral Driver Library 3.1.5
PSoC Programmer 3.29.1
PSoC Creator 4.4
Loaded Plugins:
Name: Customizer Loader
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Loads component customizers.
Name: Addin Discovery
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Discovers PSoC Creator addins (kits, language packs, etc)
Name: Device Catalog
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Device Catalog Plugin
Name: Documentation
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Adds the topics available in the documentation.
Name: Start Page
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Adds a start page to the framework.
Name: Output Window Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Adds the output window
Name: SCC Manager
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The Source Code Control Manager is the central class used for SCC actions within PSoC Creator.
Name: Symbol, Schematic and SchMacro Factory
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The Symbol and Schematic Factory is used to load, cache, and retrieve symbols and schematics.
Name: Project Manager Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Adds project management related functionality.
Name: GDE Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Loads the Symbol and Schematic editors
Name: Language Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Supports user files in multiple languages
Name: Workspace Factory
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The Workspace Factory is used to retrieve instances of PSoC Creator workspaces.
Name: Project Factory
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The Project Factory is used to retrieve instances of PSoC Creator projects.
Name: Toolchain Manager
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: PSoC Creator Toolchain Manager
Name: ARM GCC Generic
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: ARM GNU Generic
Name: ARM MDK Generic
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: ARM MDK Generic
Name: ARM IAR Generic
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: ARM IAR Generic
Name: DP8051 Keil Generic
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: DP8051 Keil Generic
Name: Device Selector
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Adds a dialog that allows the user to select a device.
Name: File Editor Factory Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Add file editors to the framework.
Name: Transport Framework
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Provides a generic device communication framework for use by other plugins.
Name: Debugger Core
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The Core Debugger provides an architecture independent framework for the common debug features.
Name: PSoC Debugger
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Provides debugging support for the different PSoC families through a GDB back end.
Name: FM Debugger
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Provides debugging support for FM device families
Name: Device IO Transport
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Provides device IO support for Cypress devices though PSoC Programmer APIs.
Name: Serial Transport
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Provides basic serial device support for the rest of the tool.
Name: Bootloader Host
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Provides a host tool to perform bootloading operations.
Name: Background Elaborator
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: PSoC Creator Background Elaborator.
Name: TypeCache Factory
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The TypeCache Factory is used to retrieve instances of TypeCaches.
Name: PSoC Fitter
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: PSoC Fitter Plugin
Name: FM Fitter
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: FM Fitter Plugin
Name: DWR Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Registers resource editors with devices.
Name: DMA Wizard
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Enables quick and correct development of applications that use DMA.
Name: Tuner Plugin
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: Manages custom component tuner executables
Name: Notice Window
Version: 4.4.0.80
Company: Cypress Semiconductor
Description: The Notice Window displays notices (status messages / errors with managed lifetimes).
I've already tried a lot of things to solve this problem. Probably the only thing I didn't do is to reinstall the OS 🙂
I have a feeling that PSoC Creator is not able to download these required components from some remote server(s). This guess is also supported by what I found in the PSoC Creator logs (C:\Users\<user>\AppData\Local\Temp\PSoC Creator-000.log):
Unable to download latest online manifest: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
It should also be mentioned that this problem is observed for different computers located on different networks. That is why I think the problem is related to some server, and not to the computer.
Show LessDear Community Members,
I found a strange behaviour of nested void functions (void functions under other void functions),
I would like to ask community members : is it a feature/expected behaviour or bug ?
let me show you:
background info:
PSoC Creator 4.4 (4.4.0.80) with latest updates, CY8CKIT-059 PSoC 5LP Prototyping Kit 1.0 Rev.*A
setup: from desktop C# I communicate with PSoC firmware by USBFS sending commands to PSOC (DMA auto management) to call different functions, like :
under main for(;;)
{
// Is there any new Out transaction..
// Data parsing ...
// call correspoding function, e.g.:
Beep_VERY_Short_Nx( 3u); // 3x Beep by toggling pins of a buzzer and led
// important1: beep function takes time to run down
// important2: every line in beep function are void functions -see later
}
my Beep function:
void Beep_VERY_Short_Nx (uint32_t Nx ) // N times
{
Pin_BUZZER_Write(1u); // BUZZER default (POR) off: silent
for (uint32_t i = 0; i < Nx; i++)
{
Pin_BUZZER_Write(0u); // pull down => beep
CyDelay(25);
Pin_BUZZER_Write(1u); // pull UP => silent
CyDelay(25);
}
}
So far everything is fine, as expected, nothing special.
First case:
If I call this beep function It return immediately. I mean the function runs fine from start to end, but in line in time (the order in which events occur) is:
1.) call Beep function,
2.) Beep function returns immediately (I see it as my firmware reply to desktop program by USBFS), this is my real quation.
3.) hear the beeps as expected but after point 2, not before point 2.
(beep runs like as async / non-blocking function in PSoC 5lp)
let me emphasize: all functions in the body of beep function are voids:
as void Pin... Write(); and void CyDelay(); functions are void functions.
If I rewrite the beep function method signature to non-void and call it, like:
uint8 result = Beep_VERY_Short_Nx( 3u );
The order is:
1.) call Beep function
2.) beeps as expected
3.) Beep function return in the end of the process.
So, in this second case the code running as expected.
So, my question is: is it (immediately return of an 'all void function') a feature/expected behaviour (e.g. from compiler optimization) or bug ?
Thanks for your kind reply,
Best Regards,
Péter
Show Less
I want to use a Kit-059 to control a 16x16 cross-point switch Analog Devices AD75019, using the SPI master component. The AD75019 takes 256 bits of serial data clocked in a CPHA= 0, CPOL=0 format.
I am examining SPIM_Example Project 1.10 to get an understanding of using am SPI as a master. I am also looking at documentation component data sheets Serial Peripheral Interface (SPI) Master 2.50, Direct Memory Access 1.70, ap notes AN52705 and AN84810, and the data sheet for the AD75019.
questions:
1) this section of the example main.c:
/* DMA Configuration for DMA_TX */
#define DMA_TX_BYTES_PER_BURST (1u)
#define DMA_TX_REQUEST_PER_BURST (1u)
#define DMA_TX_SRC_BASE (CYDEV_SRAM_BASE)
#define DMA_TX_DST_BASE (CYDEV_PERIPH_BASE)
The four DMA... are used in the DMA transmit configuration. I take it that 1u means 1 byte, unsigned integer.
Where are CYDEV_SRAM_BASE and CYDEV_PERIPH_BASE defined? These become the high order address bytes for the transmission data. Are the addresses defined by the Creator at build time? Which Spike gets used?
2) In the DMATxConfiguration function, this line:
CyDmaTdSetAddress(txTD, LO16((uint32)txBuffer), LO16((uint32) SPIM_TXDATA_PTR));
sets up the transaction descriptor. I take it that LO16((uint32)txBuffer) is the low 16 bits of the address of the transmit buffer - apparently this construction creates a pointer (or when it gets transferred to the function CyDmaTdSetAddress, it is seen as a pointer. Likewise LO16((uint32) SPIM_TXDATA_PTR) - but where is SPIM_TXDATA_PTR defined?
3) in the main function:
CyDmaChEnable(txChannel, STORE_TD_CFG_ONCMPLT);
while (0u == (SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE))
{
}
Does enabling the DMA channel cause it to transmit? If not, what does?
Where can I find the various codes, like STORE_TD_CFG_ONCMPLT, and what they mean/do?
The while loop continues through each 8 bytes of the buffer, until both SPIM_ReadTxStatus() and SPIM_STS_SPI_DONE are 1.
4) At the beginning of main.c, the data buffers are declared:
/* Data buffers */
uint8 txBuffer [BUFFER_SIZE] = {0x0u, 0x01u, 0x02u, 0x03u, 0x04u, 0x05u, 0x06u, 0x07u};
uint8 rxBuffer[BUFFER_SIZE];
How does the information in the transmit buffer (looks like octal(?) or hex(?) bytes 0 through 7) lead to the expected results per the SPIM example pdf? It is clear that Master RX data: is written directly to the LCD display.
Expected Results
The LCD should display:
Master Rx data:
090A0B0C0D0E0F
5) Since I only want to transmit the data, as the cross-point switch is not an SPI device, but it does take serial data clocked in, in the same format as SPI ( CPHA= 0, CPOL=0 format.). I don't need the MISO input. The component sheet says it needs to be connected, but to what?
Is it okay to ground it, or tie it high? Data lines selection "Bi-directional" looks more like what I need: DATA and CLOCK. Since there is only one (not quite) SPI device, I don't need the Slave Select, and plan to leave it unconnected.
I expect a few more questions, but this should help move me along.
Thank you
Show LessI started a discussion thread that had gotten locked due to inactivity.
New-custom-Counter-component-feature-set-ideas
I'd like to continue the request for new component features.
I current have a new custom component that is a special counter. I haven't officially published it yet.
The intent of this new counter is to provide additional useful features while at the same time only using the same PSoC resources as other Infineon counters currently available.
I have a working version with a number of special features. It needs documentation (datasheet) and a good demo project to display most of its capabilities and the API calls to access them.
Here's a quick overview of its current features:
- Up-counter
- Settable width 1 to 32 bits.
- Count value available by HW-routable outputs, DMA or CPU.
- Settable Unsigned or signed counting (design-time)
- Settable reset value (run-time)
- Settable increment value. (run-time) (With increment values > 1, some counts are skipped. Therefore the desired initial and maximum values may be readjusted for the count to work properly.)
- Settable initial starting value (run-time)
- Settable maximum value (run-time)
- Terminal count output
- Next Count available output (intended for DMA, ISR or HW signaling downstream)
- Reset input.
Possible enhancements:
- Settable capture input with a 4-byte FIFO capture buffer. (run-time)
- Settable Up/Down count (design-time)
- Up/Down count input (run-time)
Any other recommendations?
I'm hoping to publish this new counter by the end of June.
Show LessHello,
I am currently Running PSOC Creator on a Mac M1 running Windows 11 via Parallels Desktop.
The software runs and builds as you would expect. However, I cannot get my KitProg to show up.
It appears as a device in both OSX and Windows, but appears to be stuck in a loop of resetting / restarting etc..
Anyone have a similar issue? any workarounds known? (many google tunnels later I still have no success)
Many Thanks
Nick
Show LessHi,
I've created a new custom counter component that I haven't officially published yet. I'm waiting to see if there are any good feature add suggestions.
The component currently functions as a simple up-counter with the following features over the standard counter component:
- A settable maximum value. (This is virtually identical to the period value)
- A settable reset value. This allows from non-'0' reset values to be used. This is useful to create 'signed' value outputs where the reset value can be set to -32768 and the maximum value to 32767 so that the counter will increment from the lowest signed 16-bit value through the highest signed value.
- A settable increment value. This allows for stepping the count value in values greater than 1. For example, the counter is 32-bits in width. If I want to count from 0 to (2^32)-1 with a 48MHz count clock, it would take 89.5 seconds to complete. Using a increment of 2 would cut this down to 44.8 secs.
- The current counter value doesn't require a two-read operation as with the standard counter. The counter value is directly readable for DMA access.
Your suggestions for additional features are welcome.
Show Less