Author Topic: Don't make me Keil again!  (Read 5258 times)

0 Members and 1 Guest are viewing this topic.

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Don't make me Keil again!
« on: September 21, 2016, 12:50:02 am »
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?
« Last Edit: September 21, 2016, 01:05:50 am by SuzyC »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: Don't make me Keil again!
« Reply #1 on: September 21, 2016, 01:34:33 am »
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.
Alex
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1993
  • Country: us
    • netstuff
Re: Don't make me Keil again!
« Reply #2 on: September 21, 2016, 01:56:17 am »
All modern IDEs crash sooner or later, that's just how they are.

things got better with SATA, try that.

oh, wait.  nevermind.

;)

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Don't make me Keil again!
« Reply #3 on: September 21, 2016, 04:19:44 am »
I just started playing with the STM32F4 series and I ran across this book:
http://samples.leanpub.com/mastering-stm32-sample.pdf

It 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!
« Last Edit: September 21, 2016, 01:46:45 pm by rstofer »
 
The following users thanked this post: wilfred, Mechatrommer

Offline Corporate666

  • Supporter
  • ****
  • Posts: 2008
  • Country: us
  • Remember, you are unique, just like everybody else
Re: Don't make me Keil again!
« Reply #4 on: September 21, 2016, 06:39:05 am »
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.
It's not always the most popular person who gets the job done.
 

pla

  • Guest
Re: Don't make me Keil again!
« Reply #5 on: September 21, 2016, 10:26:48 am »
Quote
It is pretty painless to use ECLIPSE and GCC in LINUX but it can be difficult to set up for a MCU cross compilation environment and you probably have more directly commercially relevant skills with Keil in a shorter learning time with Keil than trying to learn GCC+ECLIPSE+MCU.

I 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 answer  :-\

Here are some links that might be useful:
https://github.com/libopencm3/libopencm3
https://github.com/texane/stlink
https://launchpad.net/gcc-arm-embedded
If 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
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Don't make me Keil again!
« Reply #6 on: September 21, 2016, 10:58:42 am »
Fix your PC so it runs the cypress ide

Or 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Don't make me Keil again!
« Reply #7 on: September 21, 2016, 03:52:41 pm »
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.
And 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 time  :palm:

Pick 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.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: Don't make me Keil again!
« Reply #8 on: September 21, 2016, 03:58:00 pm »
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.
And 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 time  :palm:

Pick 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.
Yup: eclipse + gcc
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Jeff_Birt

  • Regular Contributor
  • *
  • Posts: 198
  • Country: us
Re: Don't make me Keil again!
« Reply #9 on: September 21, 2016, 04:33:12 pm »
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.
 

Offline EBRAddict

  • Contributor
  • Posts: 26
  • Country: us
Re: Don't make me Keil again!
« Reply #10 on: September 21, 2016, 04:41:45 pm »
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.


 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Don't make me Keil again!
« Reply #11 on: September 21, 2016, 06:17:28 pm »
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 off Semantic 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.

 
« Last Edit: September 21, 2016, 06:23:16 pm by SuzyC »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: Don't make me Keil again!
« Reply #12 on: September 21, 2016, 06:45:43 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Jeff_Birt

  • Regular Contributor
  • *
  • Posts: 198
  • Country: us
Re: Don't make me Keil again!
« Reply #13 on: September 21, 2016, 06:53:43 pm »
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.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Don't make me Keil again!
« Reply #14 on: September 21, 2016, 08:43:35 pm »
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.
« Last Edit: September 21, 2016, 11:08:21 pm by SuzyC »
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: Don't make me Keil again!
« Reply #15 on: September 21, 2016, 09:04:56 pm »
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 ending without a 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.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Don't make me Keil again!
« Reply #16 on: September 21, 2016, 09:12:45 pm »
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?
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: Don't make me Keil again!
« Reply #17 on: September 21, 2016, 10:14:03 pm »
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.
 
The following users thanked this post: SuzyC

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Don't make me Keil again!
« Reply #18 on: September 21, 2016, 10:22:38 pm »
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.

Cypress' 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.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Don't make me Keil again!
« Reply #19 on: September 22, 2016, 12:11:03 am »
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 ending without a 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.

Genius!

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?
« Last Edit: September 22, 2016, 12:33:12 am by SuzyC »
 

Offline Jeff_Birt

  • Regular Contributor
  • *
  • Posts: 198
  • Country: us
Re: Don't make me Keil again!
« Reply #20 on: September 22, 2016, 01:24:14 pm »
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?

main() enough, :), nerd humor...I love it  :-DD
 

Offline krho

  • Regular Contributor
  • *
  • Posts: 222
  • Country: si
Re: Don't make me Keil again!
« Reply #21 on: September 22, 2016, 05:18:41 pm »
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 answer  :-\

Sorry for OT, but sources for your project are available where?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf