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 - ldmicro on ARM ST 32 bits (Discovery, Olimex...)

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

ldmicro on ARM ST 32 bits (Discovery, Olimex...) (by José GILLES)

After using a few PICs and several ATMegas with my students,
I'm now working with STµElectronics ARM STM32F407 on Olimex board (also used on well known ST Discovery board).

As I'm interested in teaching a few ladder language without buying expensive PLCs, I have downloaded ldmicro, release 2.3 first, and now release 4.4.3 sources, and rebuild it in VC++.

French language was not fully supported in 4.4.3, so I have completed and rebuilt the fr table.

And I have implemented in ldmicro my STM32F407 (32 bits with 16-bit ports). That's not finished but I yet have ports and ADCs working with example ladders. PWM, UART and SPI will follow.

A specific menu was added to generate a fully operational C program for this target (using existing additional libraries) and a modified flashMCU script based on ARMGCC enables the user to get an hex file, which is automatically downloaded to the target via Jlink emulator.

No need to quit ldmicro from ladder programming until testing results on hardware !

I think it may be an interesting improvement for a new release of ldmicro, knowing that all changes to source programs are marked with "JG" tags to be easily localised, and compatibility with other target has of course been respected.

So, I'd like to know if Ihor is interested in it ?
I can post a video demo if need be.
Attached image shows ldmicro interface + flash output.

Best regards
J. Gilles
France
Mon Dec 3 2018, 13:47:57, download attachment ldmicro1.jpg
(no subject) (by Alex)
I think it is a good upgrade, with this will terminate ldmicro bug(simulación) be fix?
Mon Dec 3 2018, 15:19:20
(no subject) (by José GILLES)
Hi

Well, almost no comment about STM32 under ldmicro...
It looks as if the boss (Mr Ihor) were either on holidays or not interested at all ? What a pity.

I'll keep on my way, since I wanna use ldmicro with my STM32.
I/O Pins, cycle timing, ADCs, PWMs are finished and UART is almost ready.

SPI will be the next step (I need it), and why not I2C, as some users claim on another post !

JG

To Alex: what is the bug in simulation you noticed above ?

Can you also repost your image (as pdf ?) about ATMega328 memory usage ? Couln't open it on forum.
Mon Dec 10 2018, 01:41:06
interesante (by Calubert)
ES
No creo que haya jefes ya que es abierto, yo creo que toda ayuda que se haga en ldmicro es interesante y si eres profesor de niños creo que el sistema de programación en escalera es mucho mas interactivo que no C++ ya que se lo toman como un juego. aquí tienes un apoyo en lo que yo te pueda aguda y como creo no solo yo habrá muchos mas en el Foro, gracias por tu ayuda.

IN
I do not think there are bosses since it is open, I believe that any help that is done in ldmicro is interesting and if you are a teacher of children I think that the system of programming in stairs is much more interactive than not C ++ since they take it as a game. here you have a support in what I can sharpen you and as I believe not only there will be many more in the Forum, thanks for your help.

FR
Je ne pense pas qu’il y ait des patrons puisque c’est ouvert, je pense que toute aide apportée dans ldmicro est intéressante et si vous êtes enseignant pour enfants, je pense que le système de programmation dans les escaliers est beaucoup plus interactif que le C ++, car ils le prennent comme un jeu. ici vous avez un soutien dans ce que je peux vous aiguiser et comme je crois que non seulement il y aura beaucoup plus dans le forum, merci pour votre aide. [email protected]
Mon Dec 10 2018, 04:46:56
(no subject) (by MGP)
The bug is when you have an empty row, normally LDmicro generates an error, now it closes the window and you lost your work if not saved before.
Mon Dec 10 2018, 05:00:33
Go ahead (by Ahmad sakr)
Hi
Go ahead and make it interesting program not only for arm but you can provide more for pic and avr like parallel lcd, modbus and others.
There is another program flprog. You can make ldmicro have features that flprog have.
Regards
Mon Dec 10 2018, 05:29:25
(no subject) (by Alex)
Thaks for your reply José GUILLES, i want to talk about some points made in this thread:

1)i think that as ldmicro forum has always been about pic´s and avr´s there is not enough people that is here for STM32, i think that when you will post your ldmicro for STM32 people will come here for asking about that, even your students for ladder tricks.

2)pdf file attach about memory usag, see please.

3)I made a video showing what i think is the bug terminate in ldmicro 4.4.3.0 and 4.4.2.0, see please

https://www.youtube.com/watch?v=PEY0V43LUK0&feature=youtu.be

also there were issues post in Ihor´s repository related to this bug:


https://github.com/LDmicro/LDmicro/issues/144

https://github.com/LDmicro/LDmicro/issues/132

4)i think that many ldmicro users has always wanted I2C or SPI for pic and avr for using other peripheral components such as lcds, sensors, etc, a way to use i2c in ladder, i don´t know how difficult could be to implement that i am just a simply ldmicro user.

5)Ihor made a good improvement in ldmicro he said that he could made connect divices VIA I2C.
(here)
http://cq.cx/ladder-forum.pl?action=viewthread&parent=4832

but he is been out for a while, as i said i am just a simply ldmicro user and i think that ldmicro 2.3 and 2.4 functions were ok that needed to improve functions they already have like ansi c or I2C, make ldmicro to use less space memory, Ihor made good improvement and added a lot fo them but wasn´t that a lot fo work for just 1 person? there were persons that helped him.
Mon Dec 10 2018, 12:46:52, download attachment memory used.pdf
(no subject) (by Alex)
Mon Dec 10 2018, 13:02:36
Terminate bug (by José GILLES)
Several kinds of "Terminate bugs" are reported above.

I've also been a victim of this amazing end of program:
for instance, open a ladder with UART functions and select a target which doesn't support it (ie Controllino Maxi) : ldmicro terminates immediately without any warning, and some work can be lost...

I've tracked this bug, mine is caugth in "Exception Execute Handler" at the very end of ldmicro.cpp and according to the call stack it is due to a pb in a Windows system DLL.
Such a bug may be hard to fix !

To Alex:
I'll try to have a look at your memory used display and your I/O list size, but I don't intend to make much more developments in ldmicro 2.x. I'd rather use my energy to improve version 4 around STM32.

I have for instance modified "instruction" menu to make more submenus by categories because it has become too heavy
in 4.x
And I'd like to rebuild lang tables, which are very incomplete in all languages.
Help would be welcome in almost all languages to translate titles ?

See you soon
JG
Mon Dec 10 2018, 15:18:59
(no subject) (by Alex)
thanks for your reply José GUILLES, it is ok, keep working in 4.x , take your time :)
Mon Dec 10 2018, 16:44:05
(no subject) (by MGP)
José, can you compare the LDmicro.ccp with an earlier versions of LDmicro.cpp because it's not the first time we have this bug and Ihor always solved this.
Tue Dec 11 2018, 07:27:08
(no subject) (by José GILLES)
It would be interesting to know how Ihor fixed the bug in the past ? But he doesn't seem to be online...

Does any one know how to use "UART SENDn variable" ? I don't know what to do with this function in my STM32 Uart !
If you have an example or an explaination, let me know.

José
Tue Dec 11 2018, 13:20:18
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):