Avatar for thejoker187

thejoker187

Member since Dec 2021 • Last active Jan 2023
  • 3 conversations
  • 24 comments

Most recent activity

  • in Porting to new Devices
    Avatar for thejoker187

    A bit late but here I am, below you'll find the board file I did and a pre compiled hex (to be used with st-link / j-link ) for flashing. Everything works really well, the only thing I haven't done yet is to decide what to do with the BTN1 device because right now it is connected to the reset pin of the nRF

  • in Porting to new Devices
    Avatar for thejoker187

    Ok, after testing everyhing went fine the board is working correctly, tomorrow I'll post a more decent board file and the compiled hex. Bye for now
    Below you'll see the most satisfying blink of mine !

  • in Porting to new Devices
    Avatar for thejoker187

    Yep, It build quite fine for every Espruino board, and yes I always use make clean first. I think I found the problem, basically in the board file i was using the function:

    def get_pins():
    

    contained the pin array as

     pins = []
    

    I changed it as i found in the nrf52840dk.py

    pins = pinutils.generate_pins(0,47)
    

    Now everything builds correctly but I'm not sure what I did is correct

  • in Porting to new Devices
    Avatar for thejoker187

    Well I only would like to have the usb as a serial device and the standard espruino bootloader to use nrf connect on my smartphone. I tried to compile with the latest espruino repo and I got this error:

    Generating platform configs
    Generating pin info
    Generating JS wrappers
    WRAPPERSOURCES = src/jswrap_array.c src/jswrap_arraybuffer.c src/jswrap_dataview.c src/jswrap_date.c src/jswrap_error.c src/jswrap_espruino.c src/jswrap_flash.c src/jswrap_functions.c src/jswrap_interactive.c src/jswrap_io.c src/jswrap_json.c src/jswrap_modules.c src/jswrap_pin.c src/jswrap_number.c src/jswrap_object.c src/jswrap_onewire.c src/jswrap_pipe.c src/jswrap_process.c src/jswrap_promise.c src/jswrap_regexp.c src/jswrap_serial.c src/jswrap_storage.c src/jswrap_spi_i2c.c src/jswrap_stream.c src/jswrap_string.c src/jswrap_waveform.c libs/compression/jswrap_heatshrink.c libs/math/jswrap_math.c libs/graphics/jswrap_graphics.c libs/network/jswrap_net.c libs/network/http/jswrap_http.c libs/network/js/jswrap_jsnetwork.c libs/bluetooth/jswrap_bluetooth.c libs/neopixel/jswrap_neopixel.c
    Generating pin info
    make: *** [Makefile:776: gen/platform_config.h] Error 1
    make: *** Waiting for unfinished jobs....
    DEFINES = -DGIT_COMMIT=4e25e2211 -DNO_ASSERT -DRELEASE -DBUILDNUMBER="5" -DNRFMDK -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10059 -DNRF_USB=1 -DUSB -DPIN_NAMES_DIRECT=1 -DUSE_DEBUGGER -DUSE_TAB_COMPLETE -DUSE_HEATSHRINK -DUSE_MATH -DUSE_GRAPHICS -DUSE_NET -DUSE_NETWORK_JS -DBLUETOOTH -DUSE_NEOPIXEL -DS140 -DNRF_SD_BLE_API_VERSION=6 -D__HEAP_SIZE=0 -DBLE_STACK_SUPPORT_REQD -DSWI_DISABLE0 -DSOFTDEVICE_PRESENT -DFLOAT_ABI_HARD -DNRF52_SERIES -DNRF52840_XXAA -DNRF52840 -DNRF5X -DNRF5X_SDK_15 -DUSE_APP_CONFIG -DARM -DLINK_TIME_OPTIMISATION -DEMBEDDED
    
  • in Porting to new Devices
    Avatar for thejoker187

    Well of course I will use the swd to fresh program everyhing from start, including bootloader.
    Below you can find the board file I'm making, please take a look at it if you can.
    Thanks

  • in Porting to new Devices
    Avatar for thejoker187

    Hello @fanoush, nice to read you again, I was able to find the schematic of the dongle I have. From waht I can see it is really simple just a nRF52840 chip a voltage regulator and a classic rgb led. You'll find the schematic below. no external flash is present by the way

  • in Porting to new Devices
    Avatar for thejoker187

    Hi all,

    I just received a couple of those nRF52840 dongles from makerdiary (as you can see below) nice boards even with a plastic shell. I would like to run Espruino on those it will be possible ? Can I build the firmware for it with actual Espruino Repo ? Thanks a lot to everyone

  • in Porting to new Devices
    Avatar for thejoker187

    A quick update, as suggested by @fanoush I logged a bit more code and here is the result:
    this is the isCharging() function:

    bool jswrap_uwatch_isCharging() {
    [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) BAT_PIN_CHARGING
      jsiConsolePrintf("*-> isCharging Debug: \n");
      jsiConsolePrintf("*-> PIN: %d\n",BAT_PIN_CHARGING);
      jsiConsolePrintf("*-> ReadPin %d\n",jshPinGetValue(BAT_PIN_CHARGING));
      jsiConsolePrintf("*-> DBG PIN Valid %d\n",jshIsPinValid(BAT_PIN_CHARGING));
      jsiConsolePrintf("*-> DBG PIN Nrf %d\n",nrf_gpio_pin_read(BAT_PIN_CHARGING));
      return jshPinGetValue(BAT_PIN_CHARGING);
    [#else](https://forum.espruino.com/search/?q=%23else)
    	
      return 0;
    [#endif](https://forum.espruino.com/search/?q=%23endif)
    }
    

    and here is the output:

    >Uwatch.isCharging()
    *-> isCharging Debug:
    *-> PIN: 19
    *-> ReadPin 1
    *-> DBG PIN Valid 1
    *-> DBG PIN Nrf 0
    =true
    >Uwatch.isCharging()
    *-> isCharging Debug:
    *-> PIN: 19
    *-> ReadPin 1
    *-> DBG PIN Valid 1
    *-> DBG PIN Nrf 0
    =true
    
    

    so from waht I can see the nrf_gpio_pin_read() is not working basically all the analog pins were added back to the board file by the way.

Actions