Interrupts on mbed

classic Classic list List threaded Threaded
6 messages Options
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|

Interrupts on mbed

This post has NOT been accepted by the mailing list yet.
Hey people! So, today I was struggling to build mbed toolchain on Linux, but unfortunately it's not compiling. Anyway, I tried to get some binary image from eLua's webbuilder and noticed that there was no option to build it with interrupt support. There are interrupts available for eLua on mbed or not? Best regards :)
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: Interrupts on mbed

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

Hi,

> Hey people! So, today I was struggling to build mbed toolchain on
> Linux, but unfortunately it's not compiling. Anyway, I tried to get

Ouch! Sorry. But the LPC17xx is a Cortex clone right? Won't the
regular arm-none-eabi-gcc work? I have never used an mbed target but
why do you want to build your baremetal toolchain?

> some binary image from eLua's webbuilder and noticed that there was
> no option to build it with interrupt support. There are interrupts
> available for eLua on mbed or not? Best regards :)

By interrupts, do you mean in the C world OR do you want to write
hooks in eLua? I just quickly looked at the source code. It looks like
the code handles interrupts. The board file for mbed doesn't define
`cints' and `luaints'. See (for example) the board config file for
Mizar32-A [1]. It defines both `cints' and `luaints'.

So, interrupts are off by default on your target. That's OK. Why don't
you define them and compile the code yourself after you figure out
a way for your toolchain?

R

References:
[1]: https://github.com/elua/elua/blob/master/boards/known/mizar32a.lua
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Interrupts on mbed

This post has NOT been accepted by the mailing list yet.
raman wrote
Ouch! Sorry. But the LPC17xx is a Cortex clone right? Won't the
regular arm-none-eabi-gcc work? I have never used an mbed target but
why do you want to build your baremetal toolchain?
The GCC ARM Embeddd toolchain should definitely work, and there is indeed very little reason to build your own toolchain. Just download it from here:

https://launchpad.net/gcc-arm-embedded

I used version 4.8 last time I tried, but it should work equally well with newer versions.

Best,
Bogdan
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|

Re: Interrupts on mbed

This post has NOT been accepted by the mailing list yet.
Raman, I wanted to write interruput handlers in, Lua, not even touching C code.
I am going to follow Bogdan's tip and install the toolchain he pointed out.
Thanks Bogdan for the link.

I will try to compile eLua for mbed and enable Lua interrupts.

Thanks!

2017-06-26 5:23 GMT-03:00 BogdanM [via eLua Development] <[hidden email]>:
raman wrote
Ouch! Sorry. But the LPC17xx is a Cortex clone right? Won't the
regular arm-none-eabi-gcc work? I have never used an mbed target but
why do you want to build your baremetal toolchain?
The GCC ARM Embeddd toolchain should definitely work, and there is indeed very little reason to build your own toolchain. Just download it from here:

https://launchpad.net/gcc-arm-embedded

I used version 4.8 last time I tried, but it should work equally well with newer versions.

Best,
Bogdan



If you reply to this email, your message will be added to the discussion below:
http://elua-development.2368040.n2.nabble.com/Interrupts-on-mbed-tp7578612p7578615.html
To unsubscribe from Interrupts on mbed, click here.
NAML



--
Gabriel Duarte
Rio de Janeiro / RJ
http://genericdev.wordpress.com/
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|

Re: Interrupts on mbed

This post has NOT been accepted by the mailing list yet.
In reply to this post by BogdanM
Unfortutatenly eLua for mbed does not define platform_int.c :(
For now I can't figure out how to use interrupts on mbed without havinh to touch C code.

:)

2017-06-26 14:22 GMT-03:00 Gabriel Duarte <[hidden email]>:
Raman, I wanted to write interruput handlers in, Lua, not even touching C code.
I am going to follow Bogdan's tip and install the toolchain he pointed out.
Thanks Bogdan for the link.

I will try to compile eLua for mbed and enable Lua interrupts.

Thanks!

2017-06-26 5:23 GMT-03:00 BogdanM [via eLua Development] <[hidden email]>:
raman wrote
Ouch! Sorry. But the LPC17xx is a Cortex clone right? Won't the
regular arm-none-eabi-gcc work? I have never used an mbed target but
why do you want to build your baremetal toolchain?
The GCC ARM Embeddd toolchain should definitely work, and there is indeed very little reason to build your own toolchain. Just download it from here:

https://launchpad.net/gcc-arm-embedded

I used version 4.8 last time I tried, but it should work equally well with newer versions.

Best,
Bogdan



If you reply to this email, your message will be added to the discussion below:
http://elua-development.2368040.n2.nabble.com/Interrupts-on-mbed-tp7578612p7578615.html
To unsubscribe from Interrupts on mbed, click here.
NAML



--
Gabriel Duarte
Rio de Janeiro / RJ
http://genericdev.wordpress.com/



--
Gabriel Duarte
Rio de Janeiro / RJ
http://genericdev.wordpress.com/
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|

Re: Interrupts on mbed

This post has NOT been accepted by the mailing list yet.
In reply to this post by gduarte
Looking at the sources and mbed docs, I saw I could use NVIC_EnableIRQ(EINT0_IRQn) (in this the case, I just need 1 external interrupt) with EINT0_IRQHandler as a fuction handler.
https://exploreembedded.com/wiki/LPC1768:_External_Interrupts