Permalink
Commits on Dec 14, 2018
  1. README: Add SPI Flash driver to be implemented

    microhobby committed Dec 14, 2018
    For HiFive1 are be all usefull we need implement
    SPI Flash driver to save and run code without have to
    open terminal.
    
    This is alpha relese 2v00.142
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  2. Boards: HIFIVE1: Fix flash memory

    microhobby committed Dec 14, 2018
    HiFive1 have 128Mb SPI flash memory
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  3. Targets: RISCV: jshardware: Add flag for reset

    microhobby committed Dec 14, 2018
    Software reset clean native functions, so when we pass through
    jshReset jshReseted is set to true that will be used in main loop
    to add native functions again.
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  4. Targets: RISCV: jshardware: Implement Reset

    microhobby committed Dec 14, 2018
    Add pin reset on jshReset, set all pins to output
    with low level.
    Do not change pins 16 and 17 they are used for SERIAL1.
    Change onboard levels to high, they are inverted high level
    means that they will be turn off.
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Commits on Dec 13, 2018
  1. README: Add HiFive

    microhobby committed Dec 13, 2018
    Add HiFive1 on Boards supported.
    I do not think Gordon will add this on his git repo,
    seeing that the open pull requests he is currently only
    giving support to the original Espruino Boards.
    
    This is the Alpha version 2v00.136
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  2. Targets: RISCV: Main: Add native clearScreen

    microhobby committed Dec 13, 2018
    Now we can clean terminal with the clear() command
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  3. Targets: RISCV: UART: Fix irq calls

    microhobby committed Dec 13, 2018
    We need call mstatus once
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  4. Targets: RISCV: jshardware: Multiple fixes

    microhobby committed Dec 13, 2018
    Fix USBSERIAL to SERIAL1
    Implement random
    Mark as FIXME some functions with return but not really implemented
    
    WARNING: mental reminder to do not make multiple fixes in
    a commit again!!!!!
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  5. Targets: RISCV: IRQ: Fix issue with terminal directions

    microhobby committed Dec 13, 2018
    Fix mstatus re-enabling.
    Add function to set mstatus once.
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  6. Boards: HIFIVE1: Add RGB leds in board def

    microhobby committed Dec 13, 2018
    Define RBG leds from HiFive1:
    LED1 = RED = PIN6
    LED2 = GREEN = PIN3
    LED3 = BLUE = PIN5
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  7. Boards: HIFIVE1: Fix USBSERIAL to SERIAL

    microhobby committed Dec 13, 2018
    I am defining too the EMBEDDED flag
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  8. Target: RISCV: Implement timer functions

    microhobby committed Dec 13, 2018
    Time are used over all Espruino and our HiFive1 need this.
    I'm using the RTC clock to get timers.
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  9. src: jsnative: Fix float argument corrupted

    microhobby committed Dec 13, 2018
    In HiFive1 sanity generate warnings for int-float-int test.
    For some reason argCount appear to be wrong, I have no time
    to deep check this so I commented. Bu we have to check it
    on future.
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  10. src: jsnative: Add Sanity test to float argument

    microhobby committed Dec 13, 2018
    I have some issues passing float arguments with jsnCallFunction
    so I wrote a sanity test to check float pass arguments
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  11. Boards: HIFIVE1: Generate only 19 pins

    microhobby committed Dec 13, 2018
    HiFive1 have 19 pins for use
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  12. Makefile: RISCV: Remove -lgcc no need

    microhobby committed Dec 13, 2018
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Commits on Dec 12, 2018
  1. Targets: RISCV: GPIO: Add GPIO lib

    microhobby committed Dec 12, 2018
    This commit add gpio lib functions and implement jsHardware
    functions related to gpio access.
    
    I test the methods:
    
    Pin.mode
    Pin.set
    Pin.reset
    Pin.toggle
    Pin.read
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  2. Targets: RISCV: MAIN: Use the minimum Espruino

    microhobby committed Dec 12, 2018
    From this commit we have a working jsTiny runtime
    Welcome to Espruino SiFive HiFive1
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  3. Targets: RISCV: jshardware: Fix IRQs and UART

    microhobby committed Dec 12, 2018
    Use new UART lib functions and fix calls for IRQ
    Implement UART IRQ callbacks
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  4. Targets: Riscv: UART lib

    microhobby committed Dec 12, 2018
    Use a new UART lib for simplify the use.
    Is based in the work of dgrubb
    https://github.com/dgrubb/HiFive1-UART
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  5. Target: RISCV: Add IRQ utils

    microhobby committed Dec 12, 2018
    Separeted sources for iterrupts functions and utils variables
    and initializations
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  6. src: jsvar: Remove debug for jsVarSize

    microhobby committed Dec 12, 2018
    With all freedom-e-sdk linked together all are working well
    jsVarSize are being initialized correctly
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  7. src: jsinteractive: Fix c for copyright

    microhobby committed Dec 12, 2018
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  8. scripts: HiFive1: Add script that compile and flash

    microhobby committed Dec 12, 2018
    This script clean old objects compile all from fresh and in the end
    try to flash espruino firmware to HiFive1 SPI.
    
    Caution: the build are supressing the warnings and errors from stdout
    so if something rule goes wrong check build.log generated.
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  9. Makefile: RISCV: Add freedom-e-sdk libs

    microhobby committed Dec 12, 2018
    Compile all to objects including the libs from freedom-e-sdk
    link all together in the rigth way, I use now the output generated
    from make software from the Sifive examples
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  10. Makefile: Rules to compile ASM

    microhobby committed Dec 12, 2018
    For HiFive1 board we need the freedom-e-sdk and
    some files are ASM files, so we need compile these assembly
    to objects
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Commits on Dec 11, 2018
  1. Targets: RISCV: jsHardware: Add irq locks

    microhobby committed Dec 11, 2018
    From a example from freedom-e-sdk we have two types of irqs
    time and machine.
    
    Core stuck when disable time irq I have to study better this PLIC
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  2. scripts: HIFIVE1: Add script to flash SPI

    microhobby committed Dec 11, 2018
    This script is a copy from gerated content from
    make flash freedom-e-sdk for flash SPI with espruino.elf
    
    All toolchain are in absolute paths from my PC this is BAD
    very BAD we are to fix it
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  3. Targets: RISCV: Main: Add myself in header

    microhobby committed Dec 11, 2018
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  4. Targets: RISCV: MAIN: Initial tests

    microhobby committed Dec 11, 2018
    Add header with info and first initialization
    for Espruino
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  5. Target: RISCV: UART: Add uart utils

    microhobby committed Dec 11, 2018
    Add the uart configurations and utils functions
    in separete files
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  6. src: jsvar: Put JSVAR_CACHE_SIZE in jsvInit

    microhobby committed Dec 11, 2018
    I do not know why when a enter this function the
    jsVarSize is zero, so I do it be JSVAR_CACHE_SIZE
    "again" and debug it to UART to be certain of his value.
    
    Now I'm losing a lot of time to debug this, so I made this workaround
    but we have to come back here later in the project to fix this
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  7. Target: RISCV: Add debug function

    microhobby committed Dec 11, 2018
    Temporary debug function that receive integer args
    to be "sprintfeed" and send to UART for debug purposes
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  8. Makefile: RISCV: Add CFLAGS and DEFINES from platformio

    microhobby committed Dec 11, 2018
    I generated a new build from platformIO and check the
    CFLAGS and DEFINES to match with my build.
    
    In this commit I added too the PLIC driver file to be build
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>
  9. Makefile: Remove espruino*.elf

    microhobby committed Dec 11, 2018
    In clean rule remove old .elf generated
    
    Signed-off-by: Matheus Castello <matheus@castello.eng.br>