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
(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.
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
(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.
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
(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.
(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.