Newlib dependency

classic Classic list List threaded Threaded
3 messages Options
varunwell10 varunwell10
Reply | Threaded
Open this post in threaded view
|

Newlib dependency

This post has NOT been accepted by the mailing list yet.
Hello elua community,

I read as pre-requisite to port for new architecture:

"Newlib is available for your CPU. eLua depends on Newlib currently (although this limitation will be eliminated in a future version), so if Newlib is not available for your CPU, you're out of luck."

=> Is it just providing definitions for setjmp and longjmp functions?
OR
It is full-fledged newlib port (incld all syscalls etc) are needed?

Some inputs would be appreciated.

Regards,
-Varun
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: Newlib dependency

This post has NOT been accepted by the mailing list yet.

Dear Varun, greetings!

> => Is it just providing definitions for setjmp and longjmp
> functions?  OR It is full-fledged newlib port (incld all syscalls
> etc) are needed?

I am not sure if I understand you entirely. A lot of what happens in
the core of eLua is because of Newlib. It does everything from
handling I/O code to memory allocation. It is shipped along with your
bare-metal toolchain (example, arm-none-eabi-gcc, avr32-gcc).

From code, you can tell Newlib and the toolchain what should happen
when for example, you invoke malloc. You can control its behaviour. It
is called a stub. eLua has a stub file too. It lives here [1]. You
should have a look at it.

> Some inputs would be appreciated.

Are you interested in writing a port for a target? Can you please tell
us which CPU/board you have at your end?

R

References:
[1]: https://github.com/elua/elua/blob/master/src/newlib/stubs.c

On 7 August 2016 at 20:04, varunwell10 [via eLua Development] <[hidden email]> wrote:
Hello elua community,

I read as pre-requisite to port for new architecture:

"Newlib is available for your CPU. eLua depends on Newlib currently (although this limitation will be eliminated in a future version), so if Newlib is not available for your CPU, you're out of luck."

=> Is it just providing definitions for setjmp and longjmp functions?
OR
It is full-fledged newlib port (incld all syscalls etc) are needed?

Some inputs would be appreciated.

Regards,
-Varun


If you reply to this email, your message will be added to the discussion below:
http://elua-development.2368040.n2.nabble.com/Newlib-dependency-tp7578582.html
To start a new topic under eLua Development, email [hidden email]
To unsubscribe from eLua Development, click here.
NAML

varunwell10 varunwell10
Reply | Threaded
Open this post in threaded view
|

Re: Newlib dependency

This post has NOT been accepted by the mailing list yet.
Hi Raman,

Thanks for quick response and good to see you here! :).

Link was helpful - I see lot of file operation stubs.

"Are you interested in writing a port for a target? Can you please tell
us which CPU/board you have at your end?"
=>I am looking to port Infineon Aurix [on Triboard TC2xx]. Unfortunately, no port of newlib is also available. So, I have started it - once done, newlib sources would be available at [1]

Since, my current target is just to port newlib part bare necessary to get eLua build running for tricore to optimize my time. Thats reason, I asked this question.

=> I also see that newlib as a library not used [did not see any *.a file in eLua sources]. How are newlib source integrated in newlib [apart from stub].

[1] - https://github.com/varunwell10/newlib [branch: https://github.com/varunwell10/newlib/tree/ifx_tricore_aurix]

Many Regards,
-Varun