Recent Changes - Search:

edit SideBar

DuktapeForSmallProcessors

Overview

This section details the details generic steps to setup setup Eclipse for Embedded development for ARM Cortex-Mx processing using DUKtape.

Debugger and Flash

There are various options for tools to flash embedded devices. In our case, we use SEGGER JLink. The steps below outline how to set up this tool to work with Eclipse

  1. Download J-link tools. Select the appropriate machine system to download. In our case we used Linux 64-bits.
  2. Once downloaded, double click on the file and install the software. The package will be installed at /opt/SEGGER
  3. Now open the test project created before and click on Packs Perspective icon. Once open, click on the Refresh icon.
  1. A list of semiconductor vendor will appear. In this case, we are using a NXP LPC1768 processor; select it from the list and install (right click on the IC name).
  1. Go back to the Project list (clicking on C/C++ icon) and select the compiled file test.elf (it is under Debug folder). Right click and select Debug As and then Debug configurations
  1. Double click on GDB SEGGER J-Link Debugging. The system automatically will create a setup called as the project name (in this case Test)
  1. Configure debugger options as shown below
  1. Now click on the debug icon and select the Test Debug Configuration
  2. A warning window might appear, just accept the option and continue.
  3. Once that the application is flashed, a window similar as below will be shown.

Compiler Options for DUKtape

For small processors, a file system is not always available. Same happens with an Operating System; there are applications that would require an OS and others that would be bare-metal. The options identified to work properly in small controllers from the ARM-Cortex-M family are:

  • DUK_OPT_NO_FILE_IO
  • DUK_OPT_LIGHTFUNC_BUILTINS
  • DUK_OPT_BUFLEN16
  • DUK_OPT_OBJSIZES16
  • DUK_OPT_REFCOUNT16
  • DUK_OPT_STRHASH16
  • DUK_OPT_STRLEN16
  • DUK_OPT_SELF_TESTS

For details on what each option does, refer to Duktape Feature Options

  • The compiler has to be set to C11 (instead of C99 as indicated in Duktape) due to compatibility issues with the standard libraries used for embedded devices.

Cortex-M0

Why not a Cortex-M0 for Duktape?

  • Memory size: Most are 32K Duktape needs more
    • Mouser Shows 32K RAM, 256K Flash to be the max for a Cortex-M0
    • See Wikipedia for a list of chips
    • NXP Kinetis k128 has 128K RAM/512K Flash
      • FRDM-KL28Z - dev kit: "The on-board interfaces include an RGB LED, a 6-axis digital sensor, a 3-axis digital angular rate gyroscope, an ambient light sensor, and a capacitive touch slider." "MKL28Z512VLL7 MCU (96 MHz, 512 KB Flash, 128 KB RAM, 32 KB ROM,100 LQFP package)"
  • FPU: We may or may not need one

See Also

Edit - History - Print - Recent Changes - Search
Page last modified on February 11, 2017, at 01:38 am