EasyC annoyances

I didn’t know what to call this thread, I wanted to talk about some issues with EasyC which are border line bugs but can not be technically categorized as so. We have debated before about the pros and cons of the ROBOTC and EasyC development environments and it’s no secret that I generally I prefer ROBOTC, however, in reality EasyC has the potential to open up features not normally available through standard runtime functions as it’s really just a wrapper and IDE for a standard compiler.

Some of the recent projects I’ve been tackling have included using eclipse as an alternative IDE, an open source loader, non volatile parameters and use of the backup registers. The test applications needed for these features have highlighted some really annoying features of the program and I wanted to share this with others.

  1. global and static variables used in a competition project don’t work as I would expect. As we know every time that EasyC detects a change from field control, enable to disable, driver to autonomous etc. the Initialize function is called. What I had not realized until recently is that this is done through some means of software reset where the code starts from the reset vector (or somewhere near the beginning). What this means is that static and global variables are reset to their initial state every time this happens :frowning: Highly annoying, I want my variables to be initialized once and left alone if I change them. EasyC provides 20 “longs” through the GlobalData function but I want standard behavior.

  2. Using PrintToScreen early in the code always fails, I always have to have a 1 second delay before sending any output to the debug terminal.

  3. Using PrintToScreen frequently results in dropped data, I always seem to having to insert Wait(50) statements in the code to slow down output so the terminal can keep up. This is a PITA and there is no reason why it has to be this way. Use a bigger buffer or flow control.

  4. LCD output suffers from the same issues as the debug terminal, using SetLCDText too soon after an InitLCD call fails, try and write both lines of the LCD too quickly and data is dropped. had a serious LCD bug that was solved by (and why are we not surprised) the insertion of a Wait(20) in the serial output code, in fact throwing in arbitrary delays happens all over the EasyC runtime library.

  5. GetLCDButtonsWatcher is buggy, depending on the call frequency the button status toggles randomly when a button is pressed on the LCD. I just wrote a simple menu system to demonstrate the non-volatile parameter feature and de-bouncing the LCD switch data from GetLCDButtonsWatcher was a major headache.

  6. There is still no sound support, VEX released the speaker back in April and the only way to use it is through code I released shortly afterwards. Its been over four months and still no official support, I can only hope that when it arrives it will be phenomenal with mp3 playback capability or something as the basic tone output I created only took about 4 hours to write.

Anyway, that will do for now, the low quality of some of the built in functions is severely limiting my ability to use EasyC to its full potential. I realize that I’m not a “normal” user but these issues effect everyone and are not things a beginning programmer should have to deal with, it’s hard enough learning to program without having to fight with the tools.


edit: written with reference to EasyC for cortex version

1 Like

What about a mecanum drive? Is there a mecanum drive block for EasyC for the PIC/Cortex yet? (I haven’t updated so I wouldn’t know :D)

There is a holonomic block so that the same block can be used for x holonomic drive as well as well as mecanum.

1 Like

Ok. Is that in EasyC Pro for PIC as well?

The copy of easyc that I have is EasyC V4 for cortex and I have no way of checking it on pic sorry.