Avatar for user66772

user66772

Member since Aug 2016 • Last active Oct 2020
  • 3 conversations
  • 17 comments

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for user66772

    Just a few hours later and some perseverance and I got it working =) . The method under Linux is:

    make clean && BOARD=PICO BOOTLOADER=1 make
    

    Then short BTN to BOOT0 under the board, indicated by a "<<" on the schematic circuit diagram.
    Plug the device into the USB port while holding down the button and run the following command:

    sudo dfu-util -a 0 -s 0x08000000 -D bootloader_espruino_2v08.5_pico_1r3.bin
    

    If the command exits without displaying a progress bar, pull the board out of USB, plug it in again with the button held, and issue the above command again. Just a little finicky.

    Once the bootloader is successfully flashed, unplug and remove the BTN / BOOT0 short, plug it back in with the button held. The red and green LEDs on the board should alternate lighting up.

    Now issue the following command:

    make clean && BOARD=PICO make serialflash
    

    The firmware will build and the STM32F401 will automatically decide which address to place the remainder of the firmware in its flash memory.

    Unplug the board, plug it back in (no need to short or hold any button down this time)

    picocom --baud 9600 --flow n /dev/ttyACM0
    

    Then press Ctrl+C once.

    This will spawn a terminal with which to send Javascript commands and functions to the espruino.

  • in Pico / Wifi / Original Espruino
    Avatar for user66772

    @MaBe Thank you for your response sir. please see my edit above in OP post.

    I removed DFU_UPDATE_BUILD=1 and added RELEASE=1 as you suggested, and still the device is not showing up as TTY to send javascript to. The WebIDE also doesn't recognize the device after flashing.

  • in Pico / Wifi / Original Espruino
    Avatar for user66772

    I am trying to build the new pico firmware from source.

    I have soldered jumpers from the BTN / BOOT0 pads so I can quickly change chip modes.

    I edited ./boards/PICO_R1_3.py so that the libraries included are as follows:

    'build' : {
       ...
       'libraries' : [
         'USB_HID',
         'NET',
         # 'GRAPHICS',
         # 'TV',
         'FILESYSTEM',
         'CRYPTO','SHA256','SHA512',
         # 'TLS',
         'NEOPIXEL'
       ],
    

    Then I ran:

    source scripts/provision.sh PICO_R1_3
    make clean && BOARD=PICO_R1_3 DFU_UPDATE_BUILD=1 make
    sudo dfu-util -a 0 -s 0x08000000 -D espruino_2v08.5_pico_1r3.bin
    

    When I plug the pico into USB again without holding the button and without the aforementioned jumpers connected, the usual single red LED blink doesn't happen and it doesn't accept the following:

    echo "digitalWrite(LED1,1);" >> /dev/ttyACM0
    

    EDIT******

    picocom --baud 9600 --flow n /dev/ttyACM0
    

    allows me to interface with the espruino in the same way the WebIDE would. I am trying to use all free software on the command line. My main problem is the binary that is made by the make command doesn't provide a TTY on the /dev/ttyACM0 device as is normally provided on the official binary. I'm a free software purist and want to use only the basic tools.
    *** end edit

    Is there something missing in my strategy?

    When I flash the official release firmware .bin file, it works fine.

  • in General
    Avatar for user66772

    I understand that once i fix the Command not found issue, make will sort itself out by taking instructions from the makefile

    What method do you normally use to add a command to the path? In my limitted understanding, I managed to get the /etc/environment file to work for me before, but if there's a better way, please comment. I'm here again with a freshly installed Ubuntu 14.04 VM.

    The build process was successful on Arch Linux without a VM. I installed the compiler in the following manner: yaourt arm-none-eabi-gcc49-linaro

    The AUR package took about 30 minutes to build on a 4GHz Core i7
    And Espruino took maybe 5 minute to build.

    Now for the hardware step

  • in JavaScript
    Avatar for user66772

    Hmm good point DrAzzy. I'm attempting to make a virtual pin registry for in case I want to use multiplexers and shift registers in tandem with each other. In a custom wrapper for espruino, those devices could be used as a source of pins, by switching the selector pins in the background to accommodate calls to a virtual pin. I have already created a workaround without too many lines. But I will try Object.keys(global) . I totally forgot about javascript being rooted in Java where everything stems from the Object object lol. And thanks for getPinMode Gordon. It's definitely worth it to leave pins such as A9 usable by any project.

    My workaround so far is such that I create virtual pin objects starting with 'Z0' through 'Z7' when initiating a 74HC595 shift register, then slapping them with a "digital output only" flag.

  • in JavaScript
    Avatar for user66772

    Is there away to programatically list all physical pins, (or better) all global variables?

  • in JavaScript
    Avatar for user66772

    I think I'm going to answer my own question...

    Pin A9 of the on-board STM32 microcontroller is always connected to the fused USB 5V voltage reference.
    The digitalWrite function essentially connects the USB voltage pin to GND, thus creating a short circuit on the USB port. This means there is no longer power going to the board AT ALL. It has been "disconnected".

    bows

Actions