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 - Using the Relocator

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

Using the Relocator (by Roy)
Hi

I am thinking of using the relocator C program.

You use the relocatable byte code option in LDmicro

and then you use the interpreter C program compiled in the processor of choice.

Is there more documentation around this ?

I am not quite sure how it will work ?

Thanks
Tue Feb 9 2016, 15:30:28
(no subject) (by Jonathan Westhues)
Have you read the comments in the sample interpreter? It should be pretty straightforward, but let me know if you have specific questions.
Tue Feb 9 2016, 15:54:08
RELOCATOR or ASSEMBLER (by Roy)
Hi Jonathan

Thanks for the reply. I need to run LDmicro on a STMF32F072B - STMicroelectronics .

I am not sure if the interpretor would be able to do everything properly ? Writing an Assembler similar to what you've done seems quite involved .

What would you suggest ?

Regards
Roy
Thu Feb 11 2016, 16:23:25
(no subject) (by Jonathan Westhues)
I'm not sure what you mean by "do everything properly", but an interpreter can do anything a compiler could. There might be a speed penalty, but your micro (assuming it's an STM32F072; the part number you give doesn't seem to exist) is already faster than the PICs and AVRs that people typically use. There would be no need to write a new assembler.
Fri Feb 12 2016, 11:04:29
Interpret (by Roy)
Hi Johnathan

Sorry for the typing error.

Just to clarify:-

The program interpret.c is to be compiled using a C compiler for the STM32F072 .

The program is used instead of a bootloader and will load the interpretable byte code into the STM32F072 and then run the code .

I am not sure windows.h is included in the interpret.c program.


Regards
Roy
Sat Feb 13 2016, 06:40:14
(no subject) (by Jonathan Westhues)
You can't just recompile the interpreter without any changes. At a minimum, you need to add code to handle whatever I/O you want to implement, and to execute the program once per cycle time. That code will be different for different targeted ICs.
Sun Feb 14 2016, 16:11:25
LDINTERPRET (by Roy)
Hi Jonathan

Do you have the int file for the example using interger a and input Xosc.

I am trying to run ldinterpret to get an idea of how it works.

I see that you wrote this as virtual machine .

Are there any other examples of ldinterpret which are embedded plc based ?


Thanks
Thu Feb 18 2016, 04:08:44
(no subject) (by Jonathan Westhues)
Try, for example, a program that increments a counter on the rising edge of Xosc, and sets integer a equal to the counter value. I'm not sure what your other question means.
Sat Feb 20 2016, 18:22:23
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):