PSoC™ Creator & Designer Forum Discussions
Hello,
I'm trying to integrate the Segger SystemView into my FreeRTOS PSOC5 project, but I'm encountering errors during the project compilation. It appears that certain assembly codes are generating 'bad instruction' errors. Please see the output below for more details:
arm-none-eabi-as.exe -mcpu=cortex-m3 -mthumb -I. -IGenerated_Source\PSoC5 -alh=.\CortexM3\ARM_GCC_541\Debug/SEGGER_RTT_ASM_ARMv7M.lst -g -W -o .\CortexM3\ARM_GCC_541\Debug\SEGGER_RTT_ASM_ARMv7M.o ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s: Assembler messages:
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:78: Error: bad instruction `name SEGGER_RTT_ASM_ARMv7M'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:93: Error: bad instruction `_ext_sym __aeabi_memcpy'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:94: Error: bad instruction `_ext_sym __aeabi_memcpy4'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:95: Error: bad instruction `_ext_sym _SEGGER_RTT'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:97: Error: bad instruction `_pub_sym SEGGER_RTT_ASM_WriteSkipNoLock'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:126: Error: unexpected character `t' in type specifier
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:126: Error: bad instruction `_section(.text, CODE,2)'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:127: Error: bad instruction `_align(2)'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:128: Error: bad instruction `_thumb_func'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:175: Error: bad instruction `_align(2)'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:237: Error: bad instruction `_place_lits'
ThirdParty\SEGGER\SEGGER\SEGGER_RTT_ASM_ARMv7M.s:240: Error: bad instruction `_end'
The command 'arm-none-eabi-as.exe' failed with exit code '1'.
I attached the ASM file that triggered the errors. Do you have any suggestions on how to address this? Could it possibly be linked to the GCC version utilized in PSOC Creator 4.4?
Thank you and best regards
Show LessHi all, recently I have updated my PSoC Creator to version 4 and I'm unable to edit or change any codes in some previous projects I made. The text cursor won't appear when I click on any lines on the main.c file. Nothing comes out when I press any key on my keyboard.
Show LessWasn't sure exactly where to put this since there isn't really a "dev tools" forum category and this seems like the closest thing.
I'm trying to familiarize myself and start using the PSoC Programmer COM Interface and running into something strange.
Following the COM Interface Guide in the PSoC Programmer program directory I've assembled a small C# .NET project to (for now) simply grab the connected programmers and report their status/capabilities. I'm using the "Late Binding" as described in section 1.2 of the COM Interface Guide.
The program works (eventually), but I'm running into a problem where the first time I press my "Connect" button I am getting System.NullReferenceException thrown on both w_IsConnected() and w_ConnectToLatest().
w_IsConnected():
w_ConnectToLatest:
Here's the event handler I have for a Connect/Disconnect toggle button:
private void btn_toggleConnect_Click(object sender, EventArgs e)
{
if (!pprog.w_IsConnected())
{
if (pprog.w_ConnectToLatest() == 0)
{
rtb_infoBox.AppendText("Programmer COM-object " + pprog.Version() + "\r\n");
if (SUCCEEDED(pprog.GetPorts(out portList, out strErr))){
foreach (string port in portList)
{
rtb_infoBox.AppendText(port + "\r\n");
}
btn_getInfo.Enabled = true;
} else
{
rtb_infoBox.AppendText(strErr + "\r\n");
}
btn_toggleConnect.Text = "Disconnect";
} else
{
rtb_infoBox.AppendText("No programmer detected.\r\n");
}
} else
{
pprog.w_Disconnect();
rtb_infoBox.AppendText("Programmer Disconnected.\r\n");
btn_toggleConnect.Text = "Connect";
btn_getInfo.Enabled = false;
}
}
It looks like the Version() member is null for some reason, and that's where the exception is being thrown. I would think it would be set when the ComLib_WrapperClass() is Instantiated in the constructor for the form:
public partial class frm_mainFrm : Form
{
PP_ComLib_WrapperClass pprog;
string[] portList;
string strErr;
public frm_mainFrm()
{
InitializeComponent();
pprog = new PP_ComLib_WrapperClass();
portList = new string[10];
strErr = "";
}
//Snipped
}
If I eat these exceptions (ignore them) and simply keep executing, after a delay of a few seconds, the application does come up with the COM object version and I can get the MiniProg 3 and KitProg (CY8CKIT-050) I have connected:
Past this point I don't seem to have any issues, I can query the capabilities of each of these devices without any problems. If I disconnect and reconnect (call w_Disconnect() and then w_ConnectToLatest()) the exceptions are no longer thrown in everything appears to operate as expected. I assume this is because the .Version() member is now loaded with a value.
Would anyone know why I'm getting these exceptions thrown at me only on the first attempt? Is there something else I should be calling to ensure my instance of the PP_ComLibWrapperClass() is ready to use? I'm following the steps laid out in the Interface Guide, so I'm not sure what I'm missing here.
I have attached the Visual Studio project, it's not very large or complex, just for now trying to find my way around using the library. If someone could see if they could reproduce this (or has any insight to why it is behaving this way) it would be very helpful.
Thanks!
Show LessJust bought a PSoc MiniProg3 to debug a special board.
I cannot install the software from www.cypress.com/psocprogrammer.
The download I get is for another program. It asks to attach the USB cable.
Nothing happens.
How do you get Psoc programmer up and running?
Seems the "quick start" guide is out of date.
D Hoffman
Hagenhoff LLC
Show LessHello, I have been using PSoC Creator for many years. But a few days ago, when I launched PSoC Creator and tried to open the design resources (i.e. the cydrw file) then, PSoC Creator freezes indefinitely. I have a Win 11 Dev machine. However, I tried it with Win 10 Enterprise running on a VM and a Win 11 Dev image running on a VM and all had exactly the same problem. This seems to be a problem that is at a lower level than a VM. Please can you investigate? The rest of the software seems to behave as expected, including compiling and programming.
Show LessHi,
I am using MiniProg4 as USB-I2C bridge. I am using COM interface with Python.
I2C initialization and port opening go well until I want to use the I2C_SendData() function. Here is my code
def SendData():
dataIN.append(reg_address)
dataIN.append(0x41)
dataIN.append(0x42)
dataIN.append(0x63)
dataIN.append(0x44)
data = array.array('B',dataIN)
hResult = I2C_SendData(devices[0], memoryview(data))
hResult = I2C_ReadData(devices[0],4)
I am using the first byte as the register address.
- The first problem is that I cannot change more than 4 bytes. For example, if dataIN has six elements instead of 5 (the first byte is the register address) the sixth byte is not changed. Why is that the case?
- The second problem is that to read 4 bytes I use I2C_ReadData() function which always returns an error of "The Address Byte is not acknowledged. Device doesn't respond". How can I fix the problem?
I have very basic knowledge of I2C and maybe I am missing something here.
Show Less
Hi,
I'm new to the PSoC and PSoC Creator, so is there a way to include the whole source folder recursively in the project? Like if I put all the supporting source into one source folder, organized into modules, do I still need to create folders in the Creator IDE one by one and include all the files?
Show LessHi,
I am following the guide for the DFU applications for PSOC6.
My understanding for this processor (PSOC 61xx) is that it does have 2 cores, but the user only has access to the CM4 core.
When I compare the GCC linker file to the one generated from the DFU, I am seeing areas for 2 cores.
Is there a more specific version available for the PSOC 61 series? I don't want to waste Flash or RAM by reserving it for a purpose that is not used.
Here is the DFU-generated linker file:
Here is the default linker file (cy8c6xx6_cm4.ld):
Show Less
Folks,
I've inherited a PSOC5 project running on PSOC Creator 4.4 - from prior contractors etc. Changes need to be
made, things re-org'd, etc.
While things are generally working OK, problem exists around naming of project - it's named something like Design03_07Aug23 , with that the name of the the .cydsn project (sub)directory - with key project files under
that subdirectory (.cywrk, .cycdx, .cyfit, .cyprj, etc) also having the problem project name.
1.) I'd like to rename the whole project to, say, "Widget" - without any date or other references and have it
'stick' and build the same way afterward - i.e, same image . Not had luck, things break down.
The .cydsn /.cyprj files have "Design03_..." names embedded in them etc. i think.
How do I do this -
... rename all the files, and change some magic setting(s) in Psoc Creator 4.4??
... do I have to edit the "XML" inside .cyprj or other files?
2.) I've been given a bunch of files in the build - some of which I think are temp files and can be deleted:
*.cywrk
*.cywrk.BillWiese
*.cydwr
*.cyfit
*.cyfit
*.cyprj
*.cyprj.BillWiese
Which files can be purged from my build for a clean build? (Presume the .cywrk files)
But I believe the .cyfit and .cyprj files are important/need to be retained. Others??
Anything else? Just trying get a clean build, not have extra files hanging around, and be properly named.
Thanks,
Bill Wiese
San Jose CA