Yagarto vs Sourcery

classic Classic list List threaded Threaded
4 messages Options
Pito Pito
Reply | Threaded
Open this post in threaded view
|

Yagarto vs Sourcery

So I replaced Yagarto (latest) with Sourcery (2011.09-69) and the
stmf4disco works with the mmc fine:
/mmc
hanoi.lua                      7954 bytes
lifebig.lua                    3431 bytes
Total on /mmc: 11385 bytes
eLua# cat /mmc/lifebig.lua
-- life1.lua
-- eLua version by Bogdan Marinescu, www.eluaproject.net
-- original by..

So there is still an issue with Yagarto. I've used the
toolchain=codesourcery with Yagarto so maybe there is a difference
in compiler settings to be considered (see map files diff)..
Enclosed pls find zip with both map files.
p.



--
- - Reklama - - - - - - - - - - - - - -
Maturity, přijímací zkoušky, státnice, diplomky... Vše o závěru
studia na středních a vysokých školách čtěte na portálu VOLNÝ.cz na
http://bit.ly/LfImCR

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

map files.zip (150K) Download Attachment
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Yagarto vs Sourcery

On Fri, Jun 29, 2012 at 1:23 PM, pito <[hidden email]> wrote:

> So I replaced Yagarto (latest) with Sourcery (2011.09-69) and the
> stmf4disco works with the mmc fine:
> /mmc
> hanoi.lua                      7954 bytes
> lifebig.lua                    3431 bytes
> Total on /mmc: 11385 bytes
> eLua# cat /mmc/lifebig.lua
> -- life1.lua
> -- eLua version by Bogdan Marinescu, www.eluaproject.net
> -- original by..
>
> So there is still an issue with Yagarto. I've used the
> toolchain=codesourcery with Yagarto so maybe there is a difference
> in compiler settings to be considered (see map files diff)..
> Enclosed pls find zip with both map files.

Then the problem is probably similar to what I've encounter a while
ago with Yagarto. I don't remember all the details now, but basically
Yagarto uses the _open_r and related functions in a different way, so
our src/newlib/stubs.c file is mostly useless. This means that we
can't do any file I/O from eLua with Yagarto ("ls" works because it's
implemented in eLua). We could probably find a fix for this if we
really tried :)

Best,
Bogdan

> p.
>
>
>
> --
> - - Reklama - - - - - - - - - - - - - -
> Maturity, přijímací zkoušky, státnice, diplomky... Vše o závěru
> studia na středních a vysokých školách čtěte na portálu VOLNÝ.cz na
> http://bit.ly/LfImCR
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Pito Pito
Reply | Threaded
Open this post in threaded view
|

Re: Yagarto vs Sourcery

Hmm, I compiled the stm32f4discovery "mp3 demo" (see chibios) with
Sourcery as well with Yagarto and it worked (it reads mp3 files from
an sdcard)...p.

----- PŮVODNÍ ZPRÁVA -----
Od: "Bogdan Marinescu" <[hidden email]>
Komu: "eLua Users and Development List (www.eluaproject.net)"
<[hidden email]>
Předmět: Re: [eLua-dev] Yagarto vs Sourcery
Datum: 29.6.2012 - 12:35:53

> On Fri, Jun 29, 2012 at 1:23 PM, pito
> <[hidden email]> wrote:
> > So I replaced Yagarto (latest) with Sourcery
> > (2011.09-69) and the
> > > stmf4disco works with the mmc fine:
> > /mmc
> > hanoi.lua                      7954 bytes
> > lifebig.lua                    3431 bytes
> > Total on /mmc: 11385 bytes
> > eLua# cat /mmc/lifebig.lua
> > -- life1.lua
> > -- eLua version by Bogdan Marinescu,
> > www.eluaproject.net
> > > -- original by..
> >
> > So there is still an issue with Yagarto. I've
> > used the
> > > toolchain=codesourcery with Yagarto so maybe
> > there is a difference
> > > in compiler settings to be considered (see map
> > files diff)..
> > > Enclosed pls find zip with both map files.
>
> Then the problem is probably similar to what I've
> encounter a while
> ago with Yagarto. I don't remember all the details
> now, but basically
> Yagarto uses the _open_r and related functions in
> a different way, so
> our src/newlib/stubs.c file is mostly useless.
> This means that we
> can't do any file I/O from eLua with Yagarto ("ls"
> works because it's
> implemented in eLua). We could probably find a fix
> for this if we
> really tried :)
>
> Best,
> Bogdan
>
> > p.
> >
> >
> >
> > --
> > - - Reklama - - - - - - - - - - - - - -
> > Maturity, přijímací zkoušky, státnice,
> > diplomky... Vše o závěru
> > > studia na středních a vysokých školách čtěte na
> > portálu VOLNÝ.cz na
> > > http://bit.ly/LfImCR
> >
> > _______________________________________________
> > eLua-dev mailing list
> > [hidden email]
> > https://lists.berlios.de/mailman/listinfo/elua-dev
> > _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>

--
- - Reklama - - - - - - - - - - - - - -
Maturity, přijímací zkoušky, státnice, diplomky... Vše o závěru
studia na středních a vysokých školách čtěte na portálu VOLNÝ.cz na
http://bit.ly/LfImCR

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Yagarto vs Sourcery

On Fri, Jun 29, 2012 at 1:44 PM, pito <[hidden email]> wrote:
> Hmm, I compiled the stm32f4discovery "mp3 demo" (see chibios) with
> Sourcery as well with Yagarto and it worked (it reads mp3 files from
> an sdcard)...p.

It depends on the implementation. eLua "plugs" into the POSIX file API
implementation in Newlib, so you can use standard calls (such as open,
read, write, close) to access files (which also means you can use the
buffered file API (fopen, fclose...)). This was one of the things that
made the Lua port to embedded an easy task. It does that by overriding
some Newlib functions (_open_r, _read_r...). Unfortunately, these
calls are not always present in Newlib, it depends on how Newlib
itself is compiled. This is most likely why Yagarto doesn't play well
with eLua.
I don't know the "mp3 demo", but I'm guessing it uses its own file
access functions.

Best,
Bogdan

>
> ----- PŮVODNÍ ZPRÁVA -----
> Od: "Bogdan Marinescu" <[hidden email]>
> Komu: "eLua Users and Development List (www.eluaproject.net)"
> <[hidden email]>
> Předmět: Re: [eLua-dev] Yagarto vs Sourcery
> Datum: 29.6.2012 - 12:35:53
>
>> On Fri, Jun 29, 2012 at 1:23 PM, pito
>> <[hidden email]> wrote:
>> > So I replaced Yagarto (latest) with Sourcery
>> > (2011.09-69) and the
>> > > stmf4disco works with the mmc fine:
>> > /mmc
>> > hanoi.lua                      7954 bytes
>> > lifebig.lua                    3431 bytes
>> > Total on /mmc: 11385 bytes
>> > eLua# cat /mmc/lifebig.lua
>> > -- life1.lua
>> > -- eLua version by Bogdan Marinescu,
>> > www.eluaproject.net
>> > > -- original by..
>> >
>> > So there is still an issue with Yagarto. I've
>> > used the
>> > > toolchain=codesourcery with Yagarto so maybe
>> > there is a difference
>> > > in compiler settings to be considered (see map
>> > files diff)..
>> > > Enclosed pls find zip with both map files.
>>
>> Then the problem is probably similar to what I've
>> encounter a while
>> ago with Yagarto. I don't remember all the details
>> now, but basically
>> Yagarto uses the _open_r and related functions in
>> a different way, so
>> our src/newlib/stubs.c file is mostly useless.
>> This means that we
>> can't do any file I/O from eLua with Yagarto ("ls"
>> works because it's
>> implemented in eLua). We could probably find a fix
>> for this if we
>> really tried :)
>>
>> Best,
>> Bogdan
>>
>> > p.
>> >
>> >
>> >
>> > --
>> > - - Reklama - - - - - - - - - - - - - -
>> > Maturity, přijímací zkoušky, státnice,
>> > diplomky... Vše o závěru
>> > > studia na středních a vysokých školách čtěte na
>> > portálu VOLNÝ.cz na
>> > > http://bit.ly/LfImCR
>> >
>> > _______________________________________________
>> > eLua-dev mailing list
>> > [hidden email]
>> > https://lists.berlios.de/mailman/listinfo/elua-dev
>> > _______________________________________________
>> eLua-dev mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>
> --
> - - Reklama - - - - - - - - - - - - - -
> Maturity, přijímací zkoušky, státnice, diplomky... Vše o závěru
> studia na středních a vysokých školách čtěte na portálu VOLNÝ.cz na
> http://bit.ly/LfImCR
>
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev