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 - New Ldmicro32 release 6.0 Revolution

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

New Ldmicro32 release 6.0 Revolution (by José)
Hi dear all

I have just uploaded to my github a brand new release of my fork version ldmicro32:

https://github.com/joegil95/LdMicro32

To test it, download LdMicro32-6.0a.zip and unpack it.

It's intended to be a revolution in LdMicro's world...
because of many changes:

When you unpack the zip file you'll get a tree like this:
---------------------------------------------------------

- Compilers: a place to put your ArmGcc, AvrGcc, PicC (or
other) C compilers (not mandatory)

- Help: the place where ldmicro help lies and where to put
your datasheets

- Input: startup files for the new ld -> C converter

- Libraries: the place where external C libraries (v6) lie

- Mcus: Mcu external descriptions

- Output: the place where intermediate files are generated
when compiling ld -> C

- Tools: a place to put your favorite programming tools
(not mandatory)

- Tests: a place where test ld files lie, and where to put
your own projects (not mandatory)

As you can see, there are many big changes:
-------------------------------------------

* Mcu definitions have been externalized, to make easier the
definition of new targets (as text files).
New PIC18F458 and PIC18F4550 have been added
If need be, a user can customize an Mcu definition wihout
recompiling ldmicro. One can customize its own config bits
for Pics, for instance.

* Help has been externalized and completed. It 's now possible
to modify help without recompiling ldmicro.

* A brand new converter has been developped to convert your
ld files into equivalent C files. Th big difference is that
resulting C files are now very easy to read and undestand.

* There's no more internal coding from ld to asm or hex
because this is the main reason why ldmicro can only
evoluate very slowly ! You must convert your ladder to C
using "Compile -> ladder to C" in the menu and then compile
your project to hex with "Compile -> Build Hex solution".
To achieve it, you'lle have to install a compiler and
slightly modify buildXXX.bat to tell where it lies on the
line beginning with "SET GCC_PATH" or "SET PCC_PATH".
It will autoatically use the external libraries lying in
the "Libraries" folder.

* Then you can upload the hex file generated, with your
favorite tool, by modifying flashMcu.bat and calling it from
LdMicro32

Advantages:
-----------

* Much more flexible to add new targets, new instructions, new
help...
Note that all integer operations can work yet with 16 or 32
bit variables.

* I may add soon floating point variables if some users are
interested...

* Pretty C/H generated files

* English and french help are now complete ; spanish help
needs to be enhanced ; contributers are welcome...

Inconvenients:
--------------

* C generated code is bigger then earlier and hex code is
bigger than the one generated handly

* So, very little targets, with very few memory, are not
adapted to LdMicro v6

* There may be some little pbs (to be solved) with some
contacts because the exact behaviour of some contacts
is not always perfectly clear in help

Hope you'll test it and if possible enjoy it !!!
Let me know if you encounter any pb.

Best regards
José
Wed Nov 17 2021, 06:19:13
(no subject) (by Paulino Calubert)
Hola jose de momento lo veo bien, Puedes colocar el ESP8266 ya que yo trabajo con este wifi y lo copilo "C" para arduino en con librerias y yo trabajo con el 32_5,5B (realizada por ti) que tenia este ESP8266.

Salut Jose en ce moment je le vois bien, vous pouvez placer l'ESP8266 puisque je travaille avec ce wifi et je le copie "C" pour arduino dans avec les bibliothèques et je travaille avec le 32_5,5B (fait par vous) que cet ESP8266 avait.

Hi Jose at the moment I see it well, you can place the ESP8266 since I work with this wifi and I copy it "C" for arduino in with libraries and I work with the 32_5,5B (made by you) that this ESP8266 had
Wed Nov 17 2021, 07:57:47
(no subject) (by Alex)
thanks a lot José
Wed Nov 17 2021, 21:58:14
thanks (by murtaza)
many many thanks
Thu Nov 18 2021, 02:18:02
(no subject) (by OnosTech)
Thanks a lot, José.

This is really revolutionary. I will test and report any issues. Looking forward to more upgrades
Thu Nov 18 2021, 09:45:38
(no subject) (by bfwolf)
Hello José,

thanks a lot for your big efforts and nice work! :)

You wrote als "Inconvenients" for your new version:
* C generated code is bigger then earlier and hex code is
bigger than the one generated handly

Did you once try out the GCC options
"-ffunction-sections -fdata-sections"
for the GCC compiler and
"-Wl,--gc-sections"
for the GCC linker?

These options heavily reduce the code and data space by removing unused functions and data which are never referenced!

I had no chance 'til now if the generated code still is fully functional (or if maybe too much is removed). Perhaps you try it - see attached "buildAvr_with_gc-sections.bbb" (must be renamed to "buildAvr.bat") as example.

Another useful thing is to add the line
"avr-objdump.exe -h -S AVRGCC\bin\%2.elf > AVRGCC\obj\%2.lss"
after the convert Elf to Hex step.
You get a full disassembly of the generated .elf with C-source as comments.

Best regards! :)
Fri Nov 19 2021, 11:51:41, download attachment buildAvr_with_gc-sections.bbb
(no subject) (by Samukelo Shezi)

Thank you very much, José! Your efforts are much appreciated.
Sat Nov 20 2021, 05:38:32
(no subject) (by Hudson)
Hello Jose.

Thanks for the improvements.

But it was not possible to test your new version on the Atmega328P 32pins, see the photo attached.

On the analog inputs, it seems to me that there was a bug in relation to pins 19 and 22 of the microcontroller.

pin 19 should be ADC6
pin 22 should be ADC7

Both are with ADC1 and when you select to define the error appears in the MCU port and Pin name.

Am I right? Could you please check the suggestion
Sat Nov 20 2021, 17:25:48, download attachment ERRO PIN Atmega328 32pins.jpg
(no subject) (by José)
Hi Hudson

You're right, there's a little mistake in AtMega328 TQFP-32 description file (Derived from the description of PDIP-28):

You can correct it by yourself by editing the description file
Mcus\ATmega328-TQFP-32.txt and modifying the wrong lines defining PC6 and PC7:

mcu.portC.pin6=PC6 (ADC6)/19
mcu.portC.pin7=PC7 (ADC7)/22

These pins don't exist on 28 pins but only on 32 pins !

You can also upload attached file and replace it in Mcus folder.

Thanks for your feedback. As I said, there will of course be some pbs to fix as in any new development.
It shows however that this externalization approach is interesting, because the pb can be solved without recompiling the software and publishing a new release !
I will just update the zip file on Github.

Let us know if it works now ?

BR
José
Sun Nov 21 2021, 03:58:44, download attachment ATmega328-TQFP-32.txt
(no subject) (by José)
Hi Paulino

You seem to use ESP8266...

I have removed this target (and others) for the time being in release 6.0 because my goal is to produce a full program.
I'll have to create a description file and libraries to manage this target.

I also intend to make Arduino targets available again in a next release.
Please keep on using release 5.5 for the time being...

BR
José
Sun Nov 21 2021, 04:26:07
A request to Paulino and THANK TO JOSE (by Angelo)
Paulino Calubert:

Would you be so kind enough to upload some examples on how to use ESP8266 using WIFI instructions?
Thank you very much in advance!!!

Thanks to Jose for this new Ldmicro version!!!
Sun Nov 21 2021, 11:56:47
(no subject) (by Hudson)
Hello Jose!

I downloaded the new version from github. The pins are OK for the Atmega328 32pins. Thanks!

But I couldn't compile my file to write to my hardware.

If I understand correctly, now LDmicro will compile straight to .C?

Before, a .hex file was generated where I saved it in hardware through Xloader.

Another detail that I noticed, my firmware is occupying 97% of the memory of the atmega 328, so it doesn't let it simulate. I set up a smaller test program, simulated. I believe, because being close to the limit, it's hard to simulate.
Sun Nov 21 2021, 16:45:39
(no subject) (by José)
Hi Hudson

LdMicro32 now uses only C compiling with external libraries.
You must install a compiler (Avr-Gcc) in the folder
Compilers\Avr8\AvrGcc

To do it, just download:
https://github.com/joegil95/Ld...ster/Compiler-AVRGCC_8.2.0.zip
and unzip it in the said folder

Edit buildAvr.bat and modify the line beginning with SET GCC_PATH to match your working directory

Then in LdMicro32 use menus Compile->Compile + Compile->Build and you'll get a .hex file in the subfolder AVRGCC\bin of your .ld location

Finally, you can upload this .hex to your target as usual.

Try with a little program first !

José
Mon Nov 22 2021, 03:36:07
Traducción (by Paulino Calubert)
Hola Jose espero que se encuentre bien, Estoy haciendo la traducción de su programa del francés al castellano.
Veo que al modificar el TXT. ya se ve en aguda en software de LSMICRO.
Pero hay errores en el software en intrusiones un ejemplo de ellos, I2C funciones recibe sale en ingles , creo que es porque se modifico y no se dijo nada al traductor.
puedes pasarme la traducción del programa LDMICRO para corregirla.
saludos Paulino.

Hello Jose I hope you are well, I am translating your program from French to Spanish.
I see that when modifying the TXT. already seen in sharp in LSMICRO software.
But there are bugs in the software in intrusions, an example of them, I2C functions are output in English, I think it's because it was modified and nothing was said to the translator.
you can give me the translation of the LDMICRO program to correct it.
greetings Paulino.

Bonjour José J'espère que vous allez bien, je traduis votre programme du français vers l'espagnol.
Je vois ça en modifiant le TXT. déjà vu en sharp dans le logiciel LSMICRO.
Mais il y a des bugs dans le logiciel dans les intrusions, un exemple, les fonctions I2C sont sorties en anglais, je pense que c'est parce qu'il a été modifié et que rien n'a été dit au traducteur.
vous pouvez me donner la traduction du programme LDMICRO pour le corriger.
salutations Paulino
Mon Nov 22 2021, 03:59:41
pora Angelo (by Paulino Calubert)
Lo hago todo con librerías externas y el software en LDMICRO.
Paso el software a C para arduino y con el mismo software de arduino lo paso a .hex y lo grabo al chic y me funciona.
te paso un Linz de un proyecto que ya esta en el mercado, date cuenta que este es un mando y un receptor y se puede ver con todo equipos que tengan wifi.. y con el software que hizo JOSE no lo he probado porque no soporta en este momento el 8266 cuando haga una modificación y lo agregue lo probare y = no hace falta usar el arduino.

lo hago = que José, pero yo no uso ningun (Avr-Gcc) ETC. uso plataforma de arduino para montar todas las librerías de C y HTML externas y uso el mismo codigo.HEX y lo cargo con el usb bas.

I do everything with external libraries and the software in LDMICRO.
I pass the software to C for arduino and with the same arduino software I pass it to .hex and I save it to chic and it works for me.
I give you a Linz from a project that is already on the market, note that this is a remote control and a receiver and it can be seen with all equipment that has Wi-Fi .. and with the software that JOSE made, I have not tried it because it does not support at this moment the 8266 when I make a modification and add it I will try it and = it is not necessary to use the arduino.

I do = that José, but I don't use any (Avr-Gcc) ETC. I use arduino platform to mount all the external C and HTML libraries and I use the same code HEX and load it with the usb bas.

https://calubert.com/es/tienda/154-gpwifi.html
Mon Nov 22 2021, 04:18:17
para Angelo (by Paulino Calubert)
Adjunto pdf del funcionamiento con librerías C + HTTML + LDMICRO.
de momento solo lo tengo en Espanol, busca por internet un traductor de pdf y lo traduces a tu idioma.

Attached pdf of the operation with C + HTML + LDMICRO libraries. At the moment I only have it in Spanish, search the internet for a pdf translator and translate it into your language.
Mon Nov 22 2021, 04:31:35, download attachment Mando Hoteles.pdf
(no subject) (by José)
Hi Paulino

I'm well, thank you ; you too I suppose ?

You have developped a nice Wifi product ! Congratulations !

I've just oredered a couple of ESP8266 to make some tests and add it to release 6.

About languages, LdMicro32 only supports the main languages english, french and spanish (with which one can go all around the world...)

LdMicro32.exe is distributed in these 3 languages in zip file, but spanish help is not complete. If you can work on it it would be a nice contribution !
Just need to compare, in Help folder, the files manual.txt (english) and manual-es.txt. When there's something missing I have put ($) in the latter.
You can open them with the freeware Notepad++.
Beware that the length of lines must be respected to have a good viewing in LdMicro.

Best Regards
José
Mon Nov 22 2021, 06:25:38
Traducción para JOSE (by Paulino Calubert)
Gracias tengo problemas con la codificación pero ya vi el error y lo soluciono quitando las letras Ñ, y los acentos ya casi lo tengo en breve lo importo a tu canal.

Merci j'ai des problèmes avec l'encodage mais j'ai déjà vu l'erreur et je la résout en supprimant les lettres Ñ, et les accents je l'ai presque sous peu je l'importe sur votre chaîne.
aaa aussi embed (comment faire) avr, pic, ARM, dans le manuel je pense que ça a l'air bien et moins d'écritures lâches. (le tout dans un écrit ou un manuel).
attaché vous pour le voir.
Je dois encore vérifier les accents et les corriger
Mon Nov 22 2021, 08:33:43, download attachment manual-es.txt
Paulino-ESP8266 (by Angelo)
Thank you very much Paulino I will order some ESP8266 and will check out the information you shared.
I appreciate.
Tue Nov 23 2021, 11:52:23
(no subject) (by José)
Thanks Paulino,

for your contribution to the spanish help.
I'll have a look at it and integrate it to the distribution.

The goal is to have the same help in 3 languages.

BR
José
Wed Nov 24 2021, 03:40:47
(no subject) (by José)
To Paulino:


Thanks again for your manuals' translation.

I have split it into 2 parts and created an "how-to" file to explain the use of ldmicro32 and external libraries as before.

Could you please have a look at the attached files and complete the spanish version to fit the english one ?
Its not long at all.

Thanks in advance.
José
Wed Nov 24 2021, 05:15:51, download attachment How-to.zip
Para JOSE Tradición (by Paulino Calubert)
Hola buenos dias jose te añado el RAR.Zip. con la traducciones de castellano la traduje del francés al castellano.
Importante antes de hacer la distribucion seria importante que mandaras las modificaciones para mirarlas por encima aver si todo esta encajado correctamente me refiero a la traduccion.
Yo creía que en el manual de ayuda estaria bien todo lo que hace LDMicro por ello añadí Comohacer.txt en el manual.

Bonjour, bonjour, Jose, j'ajoute le RAR.Zip. Avec les traductions espagnoles, je l'ai traduit du français vers l'espagnol.
Important avant de faire la distribution, il serait important que vous envoyiez les modifications pour les parcourir pour voir si tout est correctement monté, je veux dire la traduction.
J'ai pensé que tout ce que LDMicro fait serait bien dans le manuel d'aide, j'ai donc ajouté How to do.txt dans le manuel.
Thu Nov 25 2021, 04:53:29, download attachment How-to.zip
(no subject) (by Zoran)
Is it possible to make control for step motor like speed, number of pulses, acceleration, clock only for motor to go fast. I think that is missing in ld to be complete for amateur use.
Sat Nov 27 2021, 03:12:40
(no subject) (by MGP)
@Zoran, it is not necessary to hijack a topic, start a new topic if the topic has no relation to the content of the topic.

There is an instruction in LDmicro that does what you ask
https://github.com/LDmicro/LDmicro/wiki/PULSER

Ihors WIKI-pages are a source of much information and examples.
Sat Nov 27 2021, 09:28:39
(no subject) (by José)
To Paulino:

Thanks for your translations !

I'll integrate your file comer-hacer.txt in the next release I'm preparing. Here's my manual-es.txt last version.

But I don't what you'd like me to do with the other files in the zip... ?

BR
José
Sat Nov 27 2021, 09:45:10, download attachment manual-es.txt
(no subject) (by José)
To Bfwolf (above):

I'll try these linking options in the next release !

Thanks

José
Sun Nov 28 2021, 07:35:35
(no subject) (by bfwolf)
To José

Hello - i thougtht you did'nt see my post as ther was no reaction on it..

It's important to give the options
"-ffunction-sections -fdata-sections"
to the GCC compiler as it then places all funcions and data-objects each in a own section. Normally the compiler places all functions and data-objects in sections per-file.

The the linker with option
"-Wl,--gc-sections"
is able to throw away all sections not referenced by any other section.

The command
"avr-objdump.exe -h -S AVRGCC\bin\%2.elf > AVRGCC\obj\%2.lss"
after linkage is also very useful, as you get a disassembly (with C/C++ lines as comments) of the whole thing as it will be in rom after burning.

So you easily can see how good the generated code is and what may be wrong or missing (cause eg. removed by linker).

Of course all the things told are valid for the arm-GCC compiler, too!

Regards
Sun Nov 28 2021, 15:25:47
Traducción Castellano (Español (by Paulino Calubert)
Pour la traduction de jose RAR.
Salut Jose. si les autres fichiers sont la traduction du programme (des fenêtres. Comme certaines instructions qui ne sont pas justes exemple : SPI, I2C et quelques autres instructions que j'ai vues.
on parle de l'éditeur ldmicro. il n'est pas question du manuel.
Pour toute question par ce même itinéraire ou E-Mail [email protected] Salutations Paulino.

Pour la traduction de jose RAR.
Salut Jose. si les autres fichiers sont la traduction du programme (des fenêtres. Comme certaines instructions qui ne sont pas justes exemple : SPI, I2C et quelques autres instructions que j'ai vues.
on parle de l'éditeur ldmicro. il n'est pas question du manuel.
Pour toute question par ce même itinéraire ou E-Mail [email protected] Salutations Paulino.
Mon Nov 29 2021, 04:05:44
Traducción Castellano (Español (by Paulino Calubert)
Pour la traduction de jose RAR.
Salut Jose. si les autres fichiers sont la traduction du programme (des fenêtres. Comme certaines instructions qui ne sont pas justes exemple : SPI, I2C et quelques autres instructions que j'ai vues.
on parle de l'éditeur ldmicro. il n'est pas question du manuel.
Pour toute question par ce même itinéraire ou E-Mail [email protected] Salutations Paulino.

Pour la traduction de jose RAR.
Salut Jose. si les autres fichiers sont la traduction du programme (des fenêtres. Comme certaines instructions qui ne sont pas justes exemple : SPI, I2C et quelques autres instructions que j'ai vues.
on parle de l'éditeur ldmicro. il n'est pas question du manuel.
Pour toute question par ce même itinéraire ou E-Mail [email protected] Salutations Paulino.
Mon Nov 29 2021, 04:06:20
(no subject) (by José)
To Paulino:

Automatic translation in french is not very good ; I can't see what you exactly mean...

Please write in english if you can, or in spanish if not.

BR
José
Mon Nov 29 2021, 15:28:20
Varias traducciones en Castellano Para jose (by Paulino Calubert)
I hope you understand, look at the WORD

Por la traducción de jose RAR. con un ejemplo en Microsoft-Word.
Hola, José. si los otros archivos son la traducción del programa (windows. Como algunas instrucciones que no son correctas ejemplo: SPI, I2C y algunas otras instrucciones que he visto.
estamos hablando del editor ldmicro. no se trata del manual.
Para cualquier consulta por esta misma vía o E-Mail [email protected] Saludos Paulino.

For the translation of jose RAR. with an example in Microsoft-Word.
Hello Jose. if the other files are the translation of the program (windows. As some instructions that are not correct example: SPI, I2C and some other instructions that I have seen.
we are talking about the ldmicro editor. it is not the manual.
For any questions by this same route or E-Mail [email protected] Greetings Paulino.
Tue Nov 30 2021, 05:31:04, download attachment TraduccionHow-to.zip
(no subject) (by Hudson)
Hi guys, how are you.

For Jose,

It's spending more time on the new LD 6.0 - I see the proposal is good, but not all of us are experts in configurations.

I see that we always have to improve, but in a way to make things easier.

This new version that generates the file in C, demands a lot of folder adjustments and another program to pass to the hardware.

I use version 5405, before I used them all, I think so, I assemble the firmware, compile and program it in atmega through Xloader.

It's just my private opinion.

I also see, if any friend is interested (José, OnosTech) to record a video class and put it on your channel as we should do in this new LD 6.0 to save and generate the file to be transferred to hardware, in addition to adjusting the folder directories.

I would not like to be left behind in the evolution of LDmicro, but in this 6.0 I couldn't take a step if you want =\.

grateful to all
Wed Dec 1 2021, 07:21:05
(no subject) (by José)
Hi Hudson

I know that some people prefer to use standard versions of Ldmicro ; that's not a problem !

It's possible if you don't need or care with SPI and I2C peripherals, PIC18F and ARM targets, which are only well supported by Ldmicro32. It also supports 32 bits calculus and may easily support floating point variables...

In the new version 6 there's not so much configuration to do ; you just need to unzip the main file, unzip a compiler in the right folder and edit 2 or 3 batch files.

Don't worry about current version 6.0 ; I'm preparing a new release in which Arduino is back. It generates a ready made project for Arduino boards (Nano, Uno, Mega) where one just has to select the board, click on Verify and clic on Upload...
Isn't it a progress for users all of simplicity ?

BR
José
Wed Dec 1 2021, 08:35:23
add target mcu (by murtaza)
Hi
plz inform me how to add target mcu like pic16f676
Thu Dec 2 2021, 03:36:13
(no subject) (by José)
Sorry, but you can't add a new target without a good knowledge of C / C++ programmation and of ldmicro source code...

José
Thu Dec 2 2021, 12:22:23
(no subject) (by José)
PS:
it's more simple to choose an supported PIC...
Thu Dec 2 2021, 12:23:53
(no subject) (by murtaza)
Thank you for good information Mr JOSE
Fri Dec 3 2021, 00:44:22
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):