[En-Nut-Discussion] What do do with big (demo) apps on small CPU

Henrik Maier hmnews at proconx.com
Thu Jan 31 01:25:35 CET 2013


On 30/01/2013 11:02 PM, Uwe Bonnes wrote:
>>>>>> "Henrik" == Henrik Maier <hmnews at proconx.com> writes:
>
>      Henrik> On 30/01/2013 10:18 PM, Harald Kipp wrote:
>      >> Otherwise we should remove this app from the trunk. Users typically
>      >> get quite frustrated if their first contact with Nut/OS fails at such
>      >> an early stage.
>
>      Henrik> I think the lua app is still a good example on how to use and
>      Henrik> embed a lua interpreter and it should be available somehow to
>      Henrik> interested developers.
>
>      Henrik> Maybe we could split the apps in "core apps" and "extra apps"
>      Henrik> with the extra apps farmed out onto a dedicated web site rather
>      Henrik> having them in the trunk.
>
> I would propose to prepend the app/lua/lua code with
>
> #if defined(__AVR_ARCH__) && !define(_OPTIMIZE__)
> int main(void)
> {
>      unsigned long baud = 115200;
>
>      /* Initialize the console. */
>      NutRegisterDevice(&DEV_CONSOLE, 0, 0);
>      freopen(DEV_CONSOLE.dev_name, "w", stdout);
>      freopen(DEV_CONSOLE.dev_name, "w", stderr);
>      freopen(DEV_CONSOLE.dev_name, "r", stdin);
>      _ioctl(_fileno(stdin), UART_SETSPEED, &baud);
>
>      /* Display banner. */
>      puts("\nPlease compile the LUA example with optimization enabled\n");
>      while(1)
>          NutSleep(100);
> }
>
> #else
> (original code)
> #endif
>

Hi Uwe,

that is a good suggestion too.

Kind Regards

Henrik Maier



More information about the En-Nut-Discussion mailing list