• Hi, just got an Adafruit Clue a couple of weeks ago (first batch I think) and I'm trying to port Espruino to it (obvs).

    But I'm running out of ideas how to get it going - all I want to get running at first is a Bluetooth connection to the web IDE to test that JS works OK, I don't care about pins and peripherals yet.

    Hence here's my super-cut-down board file:

    import pinutils;
    
    info = {
     'name' : "Adafruit Clue",
     'link' :  [ "https://www.adafruit.com/clue" ],
     'default_console' : "EV_BLUETOOTH",
     'variables' : 2100,
     'bootloader' : 1,
     'binary_name' : 'espruino_%v_cluejs.hex',
     'build' : {
       'optimizeflags' : '-Os',
       'libraries' : [
         'BLUETOOTH',
       ],
       'makefile' : [
         'DEFINES+=-DCONFIG_GPIO_AS_PINRESET',
         'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"Clue"\'',
         'NRF_SDK15=1'
       ]
     }
    };
    
    chip = {
      'part' : "NRF52840",
      'family' : "NRF52",
      'package' : "QFN48",
      'ram' : 256,
      'flash' : 1024,
      'speed' : 64,
      'usart' : 2,
      'spi' : 3,
      'i2c' : 2,
      'adc' : 1,
      'dac' : 0,
      'saved_code' : {
        'address' : ((270 - 10) * 4096),
        'page_size' : 4096,
        'pages' : 10,
        'flash_available' : 1024 - ((31 + 30 + 2 + 10)*4)
      },
    };
    
    devices = {
      'BTN1' : { 'pin' : 'D5', 'pinstate' : 'IN_PULLDOWN' },
    };
    
    board = {
      'left' : [],
      'right' : [],
      '_notes' : {
      }
    };
    board["_css"] = """
    """;
    
    def get_pins():
      pins = [
       { "name":"PD5", "sortingname":"D05", "port":"D", "num":"17", "functions":{}, "csv":{} },
      ];
      return pins
    
    

    I nicked bits of it from the Nordic dongle suggestions on this forum (I did get the dongle working OK, so the SDK 15 stuff is fine for me). I set the JS code address up a bit in case that needs to be clear of stuff below, but I have to admit I don't know what to put there!

    I build with:

    make clean; rm *hex *.elf
    BOARD=CLUEJS RELEASE=1 make
    

    ..not DFU I don't think, cos they use uf2 for the Clue - so I flash with:

    [..]/uf2/utils/uf2conv.py -f 0xada52840 --convert espruino_2v04.399_cluejs.hex
    cp flash.uf2 /media/duncan/FTHR840BOOT/
    

    which is getting set into the device OK, but I can't see the Clue Bluetooth device in the IDE.

    Any ideas?

About

Avatar for DuncanCragg @DuncanCragg started