Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - "Compile ANSIC" fails and LDmico exits with error dialogs when the CLRWDT instruction is used

(you are viewing a thread; or go back to list of threads)

"Compile ANSIC" fails and LDmico exits with error dialogs when the CLRWDT instruction is used (by Greg Blackwell)
Test case to demonstrate this issue:
Start the current version of LDmicro version 4.3.8
Create a simple program that has a single rung with the single instruction CLRWDT
- Menu: Operations that change the course of the program -> Insert CLRWDT
Compile to ANSI C
- Menu: Compile -> Compile ANSIC
The "Compile To" dialog is displayed. Accept the default filename new.c
The LDmicro.exe displays two error dialog boxes and then exits
- the first error dialog has the text: INT_2010
- the second error dialog has the text: Internal error at line 1103 file 'ansic.cpp'

My investigation into the reason for this behaviour:
INT_CLRWDT is #define'd in the file intcode.h
In the file ansic.cpp the function GenerateAnsiC() does not have a case defined for INT_CLRWDT so it falls through to the default case which calls ooops("INT_%d", IntCode[i].op) to report the error.
Sat Mar 17 2018, 04:15:20
(no subject) (by oleksiy)
I've created an issue in LDmicro git
https://github.com/LDmicro/LDmicro/issues/49
Sat Mar 17 2018, 08:48:09
(no subject) (by Alex)
Whato about v4.3.8.1?
Sun Mar 18 2018, 18:20:39
(no subject) (by Greg Blackwell)
Alex, do you have a link to v4.3.8.1?

I have just checked https://github.com/LDmicro/LDmicro/releases
and it lists v4.3.8 as the latest release.
Mon Mar 19 2018, 01:07:11
(no subject) (by MGP)
Mon Mar 19 2018, 02:46:47
fixed in 4.3.8.2 (by Ihor Nehrutsa)
Mon Mar 19 2018, 05:08:18
(no subject) (by oleksiy)
Be patient, and wait for 4.3.8.2.
Mon Mar 19 2018, 05:09:06
(no subject) (by Greg Blackwell)
Thanks Ihor
Wed Mar 21 2018, 06:47:01
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):