Don't make me Keil again! - Page 1
Forum section: electronics / general

author: SuzyC
author_rank: Frequent Contributor
timestamp: September 21, 2016, 12:50:02 am
content: Maybe some of you Cortex Gurus can offer me a little help.I am just getting into playing around with ARM Cortex M0 devices and I am completely new to using any of the software tools that are available.I have had a lot of experience coding in C and creating simple robots using Microchip or AVR 8-bit parts and their associated IDE's.Now it seems I have entered into a new and powerful world of 32-bit MCU possibilities with my recent purchase of a Cypress PSoC 4200M xxx..043 Eval. board. However, I have already experienced complete program crashes using the PSoC Creator 3.3 IDE with trying just a few of the Cypress 4200 series chip simple example projects that I can find on the web.I haven't the money or a dire need to buy expensive tool chains as an alternative, but I have read on this board about people working with STM or TI ARM CORTEX tools, all of which I don't know a thing about, but I am enthusiastic to learn something new.I know there is quite a variety of freeware ARM software tools(GCC?) I am a complete noobie in this regard.I can see that Keil offers a free"Lite SDK" version(with code limited to 32K) of their tools on their website. I am currently trying to work with PSoC Creator and a PSoC 4200M eval. board and I want to know what advantages I would get by installing the Keil Lite package.Any ideas?

author: ataradov
author_rank: Super Contributor
timestamp: September 21, 2016, 01:34:33 am
content: There are free GCC-based tools, starting from compiler itself to full IDEs.The problem with PSoC is its proprietary peripherals, that are impossible to program without Cypress tools, so you are out of luck here and you are stuck with PSoC Creator.All modern IDEs crash sooner or later, that's just how they are.

author: linux-works
author_rank: Super Contributor
timestamp: September 21, 2016, 01:56:17 am
content: Quote from: ataradov on September 21, 2016, 01:34:33 amthings got better with SATA, try that.oh, wait. nevermind.

author: rstofer
author_rank: Super Contributor
timestamp: September 21, 2016, 04:19:44 am
content: I just started playing with the STM32F4 series and I ran across this book:http://samples.leanpub.com/mastering-stm32-sample.pdfIt is a work in progress so there are frequent upgrades...The book details installing Eclipse Neon IDE and the associated GCC tools and OpenOCD for debugging. Coupled with the STM32CubeMX tool from ST, projects are fairly easy to get started. That's not to say there isn't a steep learning curve but the toolchain isn't one of the problems.ETA: While this may be a decent toolchain for most ARM Cortex chips, it may not be helpful for the Cypress PSoC. Sorry about that!

author: Corporate666
author_rank: Unknown
timestamp: September 21, 2016, 06:39:05 am
content: If you are experiencing complete crashes with Creator 3.3 with the example programs and a Cypress Eval board, then it's something with your computer. I don't think Creator has ever crashed on me once. I have run it since the first version with PSoC3, 4, 5, BLE, PowerPSOC and various other specialty PSoC's, using the MiniProg1 and MiniProg3 as well as the eval kits with the built in programmers.It has been rock solid. I also participate on the Cypress forums, and there just aren't widespread reports of crashing issues.The PSoC chips have so much proprietary (and useful) programmable logic that it's useless trying to use alternative toolchains. The Cypress stuff is really good. Cypress as a company is really food. I'd recommend fixing whatever is wrong with your computer or your software install and giving the OEM stuff another shot.

author: Unknown
author_rank: Unknown
timestamp: September 21, 2016, 10:26:48 am
content: QuoteI can't recommend GCC+ECLIPSE+MCU. If something is not working, then you'll be left with a mostly weird error message and can't really debug it, unless you go back to CLI. If I anyway have to go to use CLI for GCC+ECLIPSE, then I'd recommend to just simply go bare metal and just use an editor like VIM or Sublime and then maintain a decent makefile. Debugging is quite straightforward with tools like gdbTUI for example. For programming you can use texane's stlink tool for linux.I am currently using libopencm3 library for my stm32f746g-discovery board. The same library can basically handle any stm cortex mcu. However I don't know about the PSOC stuff......sorry for being a little offtopic, just wanted to add to evb149's answerHere are some links that might be useful:https://github.com/libopencm3/libopencm3https://github.com/texane/stlinkhttps://launchpad.net/gcc-arm-embeddedIf you you are interested, then I can send you a link to one of my blogposts/github with a very basic example setup using libopencm3 and the stm32f746 discovery board

author: dannyf
author_rank: Super Contributor
timestamp: September 21, 2016, 10:58:42 am
content: Fix your PC so it runs the cypress ideOr Chuck it up as a loss and move on. The difficulties of running a regular ide are known - I mentioned it back then. Doing more homework woukd have helped you.Btw, to me programming the chip via the cypress ide would be reason number 1 to buy the chip or kit.

author: Brutte
author_rank: Frequent Contributor
timestamp: September 21, 2016, 03:52:41 pm
content: Quote from: SuzyC on September 21, 2016, 12:50:02 amAnd here lies the problem.You have mastered proprietary toolchain #1. After that "experience" you have mastered proprietary toolchain #2. Now you are picking essentially same route for the third timePick the tool that supports many architectures. Or stick to one tool. Otherwise you end up spending all your time on studying the toolchains instead of bringing projects to life.

author: nctnico
author_rank: Super Contributor
timestamp: September 21, 2016, 03:58:00 pm
content: Quote from: Brutte on September 21, 2016, 03:52:41 pmYup: eclipse + gcc

author: Jeff_Birt
author_rank: Regular Contributor
timestamp: September 21, 2016, 04:33:12 pm
content: I have also use the Cypress IDE quite a bit without a single crash. It sounds like there might be a permissions problem, or a corrupt download? I have used the Cypress IDE on and off since the PSoC 1 came out, it has always been top notch. The data sheets are all linked in to the parts and modules.Personally I don't care if the IDE is proprietary or not as long as it works. Open source arguments can devolve into religious arguments which are tedious. Use what works for you for the job at hand.

author: EBRAddict
author_rank: Contributor
timestamp: September 21, 2016, 04:41:45 pm
content: I've been using the PSOC Creator for a couple of months. I don't think it has crashed once. I installed it on a clean W10 32bit VM.It's quickly becoming my favorite platform after Arduino.

author: SuzyC
author_rank: Frequent Contributor
timestamp: September 21, 2016, 06:17:28 pm
content: Thanks to all for your advice! I am still totally lost trying to understand just the abbreviations for the toochain items mentioned.I guess my main question what is Keil really about? Who could benefit from their Lite package? Who is it that Keil is serving?To my surprise, there seems to be a consensus that the PSoC Creator is rock solid and my PC is somehow at fault. I don't have a clue what is causing my Creator crashes except that the problem crashing disappears if I turn offSemantic Parsing, which was suggested as a work-around by Cypress tech support.Whats so odd about this crash problem is that it only seems to be consistent with some example programs, while with many other projects, the Creator works without a problem,The fact remains that every Cortex chip maker needs to create their own chip's product identity, so how can there be one IDE or toolchain that could work so well if it has to deal with so many chips designed to be significantly different from all others.Maybe SATA is the answer.

author: nctnico
author_rank: Super Contributor
timestamp: September 21, 2016, 06:45:43 pm
content: The PSOC is an exception but in general any ARM compiler which supports the CPU core in a microcontroller can be used to produce code which runs on it. What sets the microcontrollers apart are the peripherals and their memory map. So if you have a user manual which describes the registers for the peripherals and the memory map you can create a linker description file (used by the linker so it can put the code and the data at the right addresses in the memory space) and put the right values into the registers of the peripherals. In most cases you can find a header file which defines the peripheral registers in an easy way to use in your program.

author: Jeff_Birt
author_rank: Regular Contributor
timestamp: September 21, 2016, 06:53:43 pm
content: It could be some combination of hardware/drivers on your PC causing a problem. I have seen this with certain video cards/drivers doing odd things. Many times commercial software will try to detect what card you have as there may be know problems with it that they have to work around.It might also be your installation of the Cypress software. I have seen on more than one occasion a download get corrupted and still install but have odd bugs. It could also be a glitch happened during the installation. Also check your anti-virus, anti-malware software. Many times these will stop something legitimate from happening and produce no notification to you. You may have to manually tell you AV software/firewall that it should ignore the Cypress software.

author: SuzyC
author_rank: Frequent Contributor
timestamp: September 21, 2016, 08:43:35 pm
content: Hmmm, I do have Microsoft Visual Studio 2010 installed which volunteers to invoke it's debugger when the crash occurs.Of course it could just be the NSA has installed an implant within my PC that sometimes causes the great Creator to crash.Oddly enough, the example project that will crash best when clicking on the main() source code is from "100 Projects in 100 Days" called KIT042_Theremin.cydsn.The main() code for this project invokes invokes the crash on an attempt to click on it to view the c-code.And on top of that, there is a pop-up window upon opening the project with Creator that asks me to register with Keil for a license.SATAly enough, I guess all this has Keiled my IDEa of making myself a theremin for the kids.

author: Dielectric
author_rank: Regular Contributor
timestamp: September 21, 2016, 09:04:56 pm
content: I had run into that issue while back but it was fixed at some point around 3.1 (I use Creator every day, using 3.3CP3 now). Having a .c file endingwithouta blank line caused crashes stemming from the autocomplete system. Drop a carriage return in there and everything is fine.That Keil nag is for the PSoC3, they packaged Keil in for the 8051 core but all of the ARM cored PSoCs use GCC. You can turn it off from Tools->Options->Project Management.

author: SuzyC
author_rank: Frequent Contributor
timestamp: September 21, 2016, 09:12:45 pm
content: I downloaded, untouched by my own hands, this musical project again and herewith have attached it.It is straight from "100 Projects in 100 Days" for anyone who is main() enough who dares to c the problem on their own machine.Am I the only one?

author: Dielectric
author_rank: Regular Contributor
timestamp: September 21, 2016, 10:14:03 pm
content: Yeow, it's actually bombing out on the KEES library. If I create a blank project and try to include it, I get the same unhandled exception. I know that lib is a few years old, and I'm not sure if it will get updated. It's a community-provided component library so it's sort of buyer-beware.BUT, ya don't need it and I can't see why it was included in the first place. Maybe for the pretty picture on the schematic page? Anyway, go to Project->Dependencies and unclick all of the KEES stuff. Also, you'll need to do a component update because the cy_boot is hilariously out of date. Builds fine after those two tweaks.

author: richardman
author_rank: Frequent Contributor
timestamp: September 21, 2016, 10:22:38 pm
content: Quote from: SuzyC on September 21, 2016, 06:17:28 pmCypress' PSoC4/5 are a bit different as they have analog/digital blocks, which must be configured using specialized tools. With other Cortex chips, you either use some sort of visual tools to generate init and C code - typically provided by the vendors, or just write code one way or another to eventually manipulate the IO registers. There is no configuration needed per se.

author: SuzyC
author_rank: Frequent Contributor
timestamp: September 22, 2016, 12:11:03 am
content: Quote from: Dielectric on September 21, 2016, 09:04:56 pmGenius!I noticed that the main() file ends properly just with a "}" but that very last line of code is without a CRLF. When I edited the listing just by adding a few lines at this end of the c-source, just by a coupla key presses of <ENTER>, the crashes disappeared!But there seems no way to turn off the Kiel dependencies..but this no longer seems to crash the Creator.The whole-shebang project is downloaded as .zip file. Perhaps, when the original functioning code was submitted and compressed into Zip files the .zip process truncated all unnecessary characters in every instance to minimize storage space and maybe this creates this problem due to a bug in the Symantec Parsing that can't handle a c-source EOF line that is without a CRLF? Or maybe a cluster-tip nightmare of characters, hidden characters, hidden from view but are attempted to be handled by the fumbling Symantec Parsing which fails to detect the proper EOF?

author: Jeff_Birt
author_rank: Regular Contributor
timestamp: September 22, 2016, 01:24:14 pm
content: Quote from: SuzyC on September 21, 2016, 09:12:45 pmmain() enough,, nerd humor...I love it

author: krho
author_rank: Regular Contributor
timestamp: September 22, 2016, 05:18:41 pm
content: Quote from: pla on September 21, 2016, 10:26:48 amSorry for OT, but sources for your project are available where?