Avatar for dponyatov

dponyatov

Member since Nov 2024 • Last active Jan 2025
  • 1 conversations
  • 5 comments
  • low-level & firmware programming
  • fan of custom languages making (interpreters, compilers, FORTH variants)
  • embedded Linux & MCU automation

Most recent activity

  • in Porting to new Devices
    Avatar for dponyatov

    @Gordon: Did you maybe tested some experimental version of JsVars allocation for multiple non-continues memory banks for some board with all tiny-bits optimizations enabled?

    As I see in source & debugger, for STM32F4 series there is defult build used with a single preallocated array isn't it?

    void jsvReset() {
        [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) RESIZABLE_JSVARS
        [#else](https://forum.espruino.com/search/?q=%23else)
            memset(jsVars, 0, sizeof(JsVar)*jsVarsSize);
        [#endif](https://forum.espruino.com/search/?q=%23endif)
    
  • in Porting to new Devices
    Avatar for dponyatov

    What should I add to board configs and compiler defines to make build of Espruino 2v22 for STM32F4 with RESIZABLE_JSVARS enabled?

    I added -DRESIZABLE_JSVARS into compiler options, but got this error:

    /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+fp/softfp/libg_nano.a(lib_a-sbrkr.o): in function `_sbrk_r':
    /home/pere/src/newlib-salsa/build_nano/arm-none-eabi/thumb/v7e-m+fp/softfp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/sbrkr.c:51: undefined reference to `_sbrk'
    collect2: error: ld returned 1 exit status
    make[1]: *** [make/targets/ARM.make:3: bin/horizon_2v22_dponyatov_250110.elf] Error 1
    make[1]: Leaving directory '/home/dponyatov/Espruino'
    make: *** [mk/all.mk:5: all] Error 2
    

    What I need is enabling block allocation mode but build fw with three precompiled blocks:

    • RAM 128K
    • CCMRAM 48K (3/4 of CCMRAM)
    • optional extRAM (up to 16 Mb)

    PS: I take old 2v22 thus modern versions compiles into ELF file with broken LMA/VMA table but I don't have time to fix it (all source code debug info bounded to zero address etc)

  • in General
    Avatar for dponyatov

    targets/stm32/jshardware.c

      // Remap system memory to address 0x0000 0000 in address space
    [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) STM32F4
        SYSCFG->MEMRMP = 0x01;
    [#endif](https://forum.espruino.com/search/?q=%23endif)
    
  • in General
    Avatar for dponyatov

    Good day

    I built espruino_2v24_stm32f4discovery.elf which this command line:

    ~/Espruino > BOARD=STM32F4DISCOVERY DEBUG=1 make
    

    my .gdbinit:

    ## on load
    b Reset_Handler
    b SystemInit
    b main
    monitor reset halt
    

    When I try to load .elf file into the gdb I got some strange address binding for source code lines:
    0x3930 (without startup_stm32f4xx.s link)
    0x58324
    0x35076

    It looks like address bindings to Flash ROM are totally incorrect.

    At the same time, when I build my own empty startup code (generated by latest CubeMX), there are no any problems with addresses or source code.

    Next, another problem is I always got system stopped at 0x800076c address that looks like start of EXTI0_IRQHandler

Actions