• Hi,

    I tried E.compiledC on my Bangle 1 2v16 and see weird things happening. After "Resetting without loading any code", the following

    var c = E.compiledC(`
    // void init()
    // int f()
    
    volatile int a;
    
    void init() {
      a = 0;
    }
    
    int f() {
      a++;
      return a;
    }
    `);
    
    c.init();
    setInterval(() => print(c.f()), 100);
    

    gives me

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    1644167202
    1644167203
    1644167204
    1644167205
    1644167206
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    268435505
    50
    51
    52
    53
    54
    55
    1811939384
    57
    58
    1761607739
    1761607740
    1761607741
    1761607742
    1761607743
    1761607744
    1761607745
    1761607746
    

    Prior to that I ran code which wrote to RAM locations where it shouldn't have. So I rebooted and reflashed the firmware hoping it would reset the device and resolve the issues I see. Is there anything I can do? Its a bit scary to run code that might modify any RAM location at any point.

    Thanks in advance!

About

Avatar for !evil @!evil started