OLED implementation?

did someone make an OLED work on the AKSO?
I tried the TIAR Libs, which are running fine on the Axoloti, but the AKSO patcher throws a huge list of errors.

Any ideas?

Generate code complete
Compiling patch.
Der Befehl "sed" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
process_begin: CreateProcess(NULL, sed -n s/^\/\/$MODULES=\(.*\)/\1/gp ../build/xpatch.cpp, ...) failed.
Makefile.patch:98: pipe: No such file or directory
process_begin: CreateProcess(NULL, sed -n s/^\/\/$MODULE_DIRS=\(.*\)/\1/gp ../build/xpatch.cpp, ...) failed.
Makefile.patch:99: pipe: No such file or directory
In file included from ../firmware/spilink.h:29,
                 from ../firmware/axoloti.h:33,
                 from ../firmware/xpatch.h:3:
../firmware/axoloti_control.h:21:18: error: expected identifier before numeric constant
 #define LCDWIDTH 128
                  ^~~
../build/xpatch.cpp:163:1: note: in expansion of macro 'LCDWIDTH'
 LCDWIDTH            = 128,
 ^~~~~~~~
../firmware/axoloti_control.h:21:18: error: expected '}' before numeric constant
 #define LCDWIDTH 128
                  ^~~
../build/xpatch.cpp:163:1: note: in expansion of macro 'LCDWIDTH'
 LCDWIDTH            = 128,
 ^~~~~~~~
../build/xpatch.cpp:162:14: note: to match this '{'
 enum SSD1306 {
              ^
In file included from ../firmware/spilink.h:29,
                 from ../firmware/axoloti.h:33,
                 from ../firmware/xpatch.h:3:
../firmware/axoloti_control.h:21:18: error: expected unqualified-id before numeric constant
 #define LCDWIDTH 128
                  ^~~
../build/xpatch.cpp:163:1: note: in expansion of macro 'LCDWIDTH'
 LCDWIDTH            = 128,
 ^~~~~~~~
../build/xpatch.cpp: In member function 'void rootc::fill(uint8_t)':
../build/xpatch.cpp:224:7: error: 'COLUMNADDR' was not declared in this scope
   cmd(COLUMNADDR, 0, 127); // Column start end
       ^~~~~~~~~~
../build/xpatch.cpp:225:7: error: 'PAGEADDR' was not declared in this scope
   cmd(PAGEADDR,   0,   7); // Page start end
       ^~~~~~~~
../build/xpatch.cpp: In member function 'void rootc::sendPage(int)':
../build/xpatch.cpp:388:7: error: 'COLUMNADDR' was not declared in this scope
   cmd(COLUMNADDR, 0, 127);   // Column start end
       ^~~~~~~~~~
../build/xpatch.cpp:389:7: error: 'PAGEADDR' was not declared in this scope
   cmd(PAGEADDR, page, page);  // Page start end
       ^~~~~~~~
../build/xpatch.cpp: In member function 'void rootc::init()':
../build/xpatch.cpp:419:9: error: 'DISPLAYOFF' was not declared in this scope
     cmd(DISPLAYOFF);
         ^~~~~~~~~~
../build/xpatch.cpp:423:9: error: 'SETDISPLAYCLOCKDIV' was not declared in this scope
     cmd(SETDISPLAYCLOCKDIV, 0x80);
         ^~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:424:9: error: 'SETMULTIPLEX' was not declared in this scope
     cmd(SETMULTIPLEX, LCDHEIGHT - 1);
         ^~~~~~~~~~~~
../build/xpatch.cpp:425:9: error: 'SETDISPLAYOFFSET' was not declared in this scope
     cmd(SETDISPLAYOFFSET, 1309 == 1306 ? 0x00 : 0x01);
         ^~~~~~~~~~~~~~~~
../build/xpatch.cpp:426:9: error: 'SETSTARTLINE_0' was not declared in this scope
     cmd(SETSTARTLINE_0);
         ^~~~~~~~~~~~~~
../build/xpatch.cpp:427:9: error: 'MEMORYMODE' was not declared in this scope
     cmd(MEMORYMODE, 0x00); //horizontal
         ^~~~~~~~~~
../build/xpatch.cpp:427:9: note: suggested alternative: 'REG_REMOVE'
     cmd(MEMORYMODE, 0x00); //horizontal
         ^~~~~~~~~~
         REG_REMOVE
../build/xpatch.cpp:428:9: error: 'SEGREMAP' was not declared in this scope
     cmd(SEGREMAP | 0x1);
         ^~~~~~~~
../build/xpatch.cpp:429:9: error: 'COMSCANDEC' was not declared in this scope
     cmd(COMSCANDEC);
         ^~~~~~~~~~
../build/xpatch.cpp:431:9: error: 'SETCOMPINS' was not declared in this scope
     cmd(SETCOMPINS, 0x12);
         ^~~~~~~~~~
../build/xpatch.cpp:431:9: note: suggested alternative: 'STOPPING'
     cmd(SETCOMPINS, 0x12);
         ^~~~~~~~~~
         STOPPING
../build/xpatch.cpp:432:9: error: 'SETCONTRAST' was not declared in this scope
     cmd(SETCONTRAST, 0xCF);
         ^~~~~~~~~~~
../build/xpatch.cpp:432:9: note: suggested alternative: 'RTC_TR_ST'
     cmd(SETCONTRAST, 0xCF);
         ^~~~~~~~~~~
         RTC_TR_ST
../build/xpatch.cpp:433:9: error: 'SETPRECHARGE' was not declared in this scope
     cmd(SETPRECHARGE, 0xF1);
         ^~~~~~~~~~~~
../build/xpatch.cpp:434:9: error: 'SETVCOMDETECT' was not declared in this scope
     cmd(SETVCOMDETECT, 0x40);
         ^~~~~~~~~~~~~
../build/xpatch.cpp:435:9: error: 'DISPLAYALLON_RESUME' was not declared in this scope
     cmd(DISPLAYALLON_RESUME);
         ^~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:436:9: error: 'NORMALDISPLAY' was not declared in this scope
     cmd(NORMALDISPLAY);
         ^~~~~~~~~~~~~
../build/xpatch.cpp:436:9: note: suggested alternative: 'NORMALPRIO'
     cmd(NORMALDISPLAY);
         ^~~~~~~~~~~~~
         NORMALPRIO
../build/xpatch.cpp:437:9: error: 'DEACTIVATE_SCROLL' was not declared in this scope
     cmd(DEACTIVATE_SCROLL);
         ^~~~~~~~~~~~~~~~~
../build/xpatch.cpp:438:9: error: 'CHARGEPUMP' was not declared in this scope
     cmd(CHARGEPUMP, 0x14);
         ^~~~~~~~~~
../build/xpatch.cpp:438:9: note: suggested alternative: 'HCCHAR_EPTYP'
     cmd(CHARGEPUMP, 0x14);
         ^~~~~~~~~~
         HCCHAR_EPTYP
../build/xpatch.cpp:439:9: error: 'DISPLAYON' was not declared in this scope
     cmd(DISPLAYON);
         ^~~~~~~~~
../build/xpatch.cpp:441:9: error: 'DISPLAYOFF' was not declared in this scope
     cmd(DISPLAYOFF);
         ^~~~~~~~~~
../build/xpatch.cpp:442:9: error: 'SETDISPLAYCLOCKDIV' was not declared in this scope
     cmd(SETDISPLAYCLOCKDIV, 0xA0);// vs 80
         ^~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:443:9: error: 'SETMULTIPLEX' was not declared in this scope
     cmd(SETMULTIPLEX, 0x3F);
         ^~~~~~~~~~~~
../build/xpatch.cpp:444:9: error: 'SETDISPLAYOFFSET' was not declared in this scope
     cmd(SETDISPLAYOFFSET, 0x00);
         ^~~~~~~~~~~~~~~~
../build/xpatch.cpp:445:9: error: 'SETSTARTLINE_0' was not declared in this scope
     cmd(SETSTARTLINE_0);
         ^~~~~~~~~~~~~~
../build/xpatch.cpp:446:9: error: 'MEMORYMODE' was not declared in this scope
     cmd(MEMORYMODE, 0x00);
         ^~~~~~~~~~
../build/xpatch.cpp:446:9: note: suggested alternative: 'REG_REMOVE'
     cmd(MEMORYMODE, 0x00);
         ^~~~~~~~~~
         REG_REMOVE
../build/xpatch.cpp:447:9: error: 'SEGREMAP' was not declared in this scope
     cmd(SEGREMAP | 0x1);
         ^~~~~~~~
../build/xpatch.cpp:448:9: error: 'COMSCANDEC' was not declared in this scope
     cmd(COMSCANDEC);
         ^~~~~~~~~~
../build/xpatch.cpp:449:9: error: 'SETCOMPINS' was not declared in this scope
     cmd(SETCOMPINS, 0x12);
         ^~~~~~~~~~
../build/xpatch.cpp:449:9: note: suggested alternative: 'STOPPING'
     cmd(SETCOMPINS, 0x12);
         ^~~~~~~~~~
         STOPPING
../build/xpatch.cpp:450:9: error: 'SETCONTRAST' was not declared in this scope
     cmd(SETCONTRAST, 0x6F);    //vs 0xCF
         ^~~~~~~~~~~
../build/xpatch.cpp:450:9: note: suggested alternative: 'RTC_TR_ST'
     cmd(SETCONTRAST, 0x6F);    //vs 0xCF
         ^~~~~~~~~~~
         RTC_TR_ST
../build/xpatch.cpp:451:9: error: 'SETPRECHARGE' was not declared in this scope
     cmd(SETPRECHARGE, 0xD3);   //vs 0xF1   /* [2] pre-charge period 0x022/f1*/
         ^~~~~~~~~~~~
../build/xpatch.cpp:452:9: error: 'SETVCOMDETECT' was not declared in this scope
     cmd(SETVCOMDETECT, 0x20);  //vs 0x40   /* vcomh deselect level */
         ^~~~~~~~~~~~~
../build/xpatch.cpp:455:9: error: 'DEACTIVATE_SCROLL' was not declared in this scope
     cmd(DEACTIVATE_SCROLL);
         ^~~~~~~~~~~~~~~~~
../build/xpatch.cpp:456:9: error: 'DISPLAYALLON_RESUME' was not declared in this scope
     cmd(DISPLAYALLON_RESUME);
         ^~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:457:9: error: 'NORMALDISPLAY' was not declared in this scope
     cmd(NORMALDISPLAY);
         ^~~~~~~~~~~~~
../build/xpatch.cpp:457:9: note: suggested alternative: 'NORMALPRIO'
     cmd(NORMALDISPLAY);
         ^~~~~~~~~~~~~
         NORMALPRIO
../build/xpatch.cpp:458:9: error: 'CHARGEPUMP' was not declared in this scope
     cmd(CHARGEPUMP, 0x14);
         ^~~~~~~~~~
../build/xpatch.cpp:458:9: note: suggested alternative: 'HCCHAR_EPTYP'
     cmd(CHARGEPUMP, 0x14);
         ^~~~~~~~~~
         HCCHAR_EPTYP
../build/xpatch.cpp:459:9: error: 'DISPLAYON' was not declared in this scope
     cmd(DISPLAYON);
         ^~~~~~~~~
../build/xpatch.cpp: In member function 'msg_t rootc::ThreadX2()':
../build/xpatch.cpp:487:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
../build/xpatch.cpp: In static member function 'static msg_t rootc::ThreadX(void*)':
../build/xpatch.cpp:490:45: error: 'class rootc::instanceOLED128x64bigNoScope__1' has no member named 'ThreadX2'
   ((instanceOLED128x64bigNoScope__1 *)arg)->ThreadX2();
                                             ^~~~~~~~
../build/xpatch.cpp:491:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
../build/xpatch.cpp: In member function 'void rootc::Init(rootc*)':
../build/xpatch.cpp:499:88: warning: invalid conversion from 'msg_t (*)(void*)' {aka 'long int (*)(void*)'} to 'tfunc_t' {aka 'void (*)(void*)'} [-fpermissive]
 Thd = chThdCreateStatic(waThreadX, sizeof(waThreadX), NORMALPRIO, ThreadX, (void *)this);
                                                                                        ^
In file included from C:\Users\m_kor\Downloads\akso-win-3.0.1\akso-3.0.1\external/ChibiOS/os/rt/include/ch.h:117,
                 from ../firmware/patch.h:21,
                 from ../firmware/xpatch.h:2:
C:\Users\m_kor\Downloads\akso-win-3.0.1\akso-3.0.1\external/ChibiOS/os/rt/include/chthreads.h:232:53: note:   initializing argument 4 of 'thread_t* chThdCreateStatic(void*, size_t, tprio_t, tfunc_t, void*)'
                               tprio_t prio, tfunc_t pf, void *arg);
                                             ~~~~~~~~^~
../build/xpatch.cpp: At global scope:
../build/xpatch.cpp:613:6: error: 'instanceremind4__1' does not name a type
      instanceremind4__1 instanceremind4__1_i;
      ^~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:614:6: error: 'instanceOLED128x64bigNoScope__1' does not name a type
      instanceOLED128x64bigNoScope__1 instanceOLED128x64bigNoScope__1_i;
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:625:23: error: 'NPRESETS' was not declared in this scope
       int32_t presets[NPRESETS][NPRESET_ENTRIES][2] = {
                       ^~~~~~~~
../build/xpatch.cpp:625:23: note: suggested alternative: 'RESET'
       int32_t presets[NPRESETS][NPRESET_ENTRIES][2] = {
                       ^~~~~~~~
                       RESET
../build/xpatch.cpp:625:33: error: 'NPRESET_ENTRIES' was not declared in this scope
       int32_t presets[NPRESETS][NPRESET_ENTRIES][2] = {
                                 ^~~~~~~~~~~~~~~
../build/xpatch.cpp: In function 'const int32_t* GetPresets()':
../build/xpatch.cpp:708:22: error: 'presets' was not declared in this scope
   return (int32_t *)&presets[0][0][0];
                      ^~~~~~~
../build/xpatch.cpp:708:22: note: suggested alternative: 'GetPresets'
   return (int32_t *)&presets[0][0][0];
                      ^~~~~~~
                      GetPresets
../build/xpatch.cpp: In function 'void ApplyPreset(int)':
../build/xpatch.cpp:715:16: error: 'nparams' was not declared in this scope
      for(i=0;i<nparams;i++){
                ^~~~~~~
../build/xpatch.cpp:716:26: error: 'PExch' was not declared in this scope
         ParameterChange(&PExch[i], p[i], 0xFFEF);
                          ^~~~~
../build/xpatch.cpp:720:16: error: 'NPRESETS' was not declared in this scope
    if (index < NPRESETS) {
                ^~~~~~~~
../build/xpatch.cpp:720:16: note: suggested alternative: 'RESET'
    if (index < NPRESETS) {
                ^~~~~~~~
                RESET
../build/xpatch.cpp:722:41: error: 'NPRESET_ENTRIES' was not declared in this scope
      PresetParamChange_t *p = &pa[index*NPRESET_ENTRIES];
                                         ^~~~~~~~~~~~~~~
../build/xpatch.cpp:726:47: error: 'nparams' was not declared in this scope
          if ((pp->pexIndex>=0)&&(pp->pexIndex<nparams)) {
                                               ^~~~~~~
../build/xpatch.cpp:727:30: error: 'PExch' was not declared in this scope
             ParameterChange(&PExch[pp->pexIndex],pp->value,0xFFEF);         }
                              ^~~~~
../build/xpatch.cpp: In function 'PExModulationTarget_t* GetModulationTable()':
../build/xpatch.cpp:733:61: error: 'NMODULATIONSOURCES' was not declared in this scope
     static const PExModulationTarget_t PExModulationSources[NMODULATIONSOURCES][NMODULATIONTARGETS] =
                                                             ^~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:733:81: error: 'NMODULATIONTARGETS' was not declared in this scope
     static const PExModulationTarget_t PExModulationSources[NMODULATIONSOURCES][NMODULATIONTARGETS] =
                                                                                 ^~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:742:37: error: 'PExModulationSources' was not declared in this scope
    return (PExModulationTarget_t *)&PExModulationSources[0][0];
                                     ^~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:742:37: note: suggested alternative: 'PExModulationTarget_t'
    return (PExModulationTarget_t *)&PExModulationSources[0][0];
                                     ^~~~~~~~~~~~~~~~~~~~
                                     PExModulationTarget_t
../build/xpatch.cpp: In function 'void Init()':
../build/xpatch.cpp:746:4: error: 'instanceremind4__1_i' was not declared in this scope
    instanceremind4__1_i.Init(this );
    ^~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:746:30: error: invalid use of 'this' in non-member function
    instanceremind4__1_i.Init(this );
                              ^~~~
../build/xpatch.cpp:747:4: error: 'instanceOLED128x64bigNoScope__1_i' was not declared in this scope
    instanceOLED128x64bigNoScope__1_i.Init(this );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:747:43: error: invalid use of 'this' in non-member function
    instanceOLED128x64bigNoScope__1_i.Init(this );
                                           ^~~~
../build/xpatch.cpp:754:29: error: 'PExch' was not declared in this scope
       Parameter_t *param = &PExch[j];
                             ^~~~~
../build/xpatch.cpp:760:19: error: 'PExModulationPrevVal' was not declared in this scope
    int32_t *pp = &PExModulationPrevVal[0][0];
                   ^~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:760:19: note: suggested alternative: 'PExModulationTarget_t'
    int32_t *pp = &PExModulationPrevVal[0][0];
                   ^~~~~~~~~~~~~~~~~~~~
                   PExModulationTarget_t
../build/xpatch.cpp:761:16: error: 'NMODULATIONSOURCES' was not declared in this scope
    for(j=0;j<1*NMODULATIONSOURCES;j++){
                ^~~~~~~~~~~~~~~~~~
../build/xpatch.cpp: In function 'void Dispose()':
../build/xpatch.cpp:768:4: error: 'instanceOLED128x64bigNoScope__1_i' was not declared in this scope
    instanceOLED128x64bigNoScope__1_i.Dispose();
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:769:4: error: 'instanceremind4__1_i' was not declared in this scope
    instanceremind4__1_i.Dispose();
    ^~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp: In function 'void dsp()':
../build/xpatch.cpp:787:3: error: 'instanceremind4__1_i' was not declared in this scope
   instanceremind4__1_i.dsp( this , 0, 0, 0 , 0 , 0 , 0 , (bool &)UNCONNECTED_OUTPUT, net0);
   ^~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:787:29: error: invalid use of 'this' in non-member function
   instanceremind4__1_i.dsp( this , 0, 0, 0 , 0 , 0 , 0 , (bool &)UNCONNECTED_OUTPUT, net0);
                             ^~~~
../build/xpatch.cpp:788:3: error: 'instanceOLED128x64bigNoScope__1_i' was not declared in this scope
   instanceOLED128x64bigNoScope__1_i.dsp( this , net0, 0, 0, 0, 0, 0, 0, 0, 0);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../build/xpatch.cpp:788:42: error: invalid use of 'this' in non-member function
   instanceOLED128x64bigNoScope__1_i.dsp( this , net0, 0, 0, 0, 0, 0, 0, 0, 0);
                                          ^~~~
../build/xpatch.cpp: At global scope:
../build/xpatch.cpp:797:1: error: expected declaration before '}' token
 };
 ^
make: *** [Makefile.patch:105: ../build/xpatch.o] Error 1
Compiling patch failed.
shell task failed, exit value: 1
axoloti.shell.ExecutionFailedException
axoloti.shell.ExecutionFailedException
	at axoloti.shell.ShellTask.run(ShellTask.java:120)
	at axoloti.shell.ShellTask.lambda$getJob$0(ShellTask.java:37)
	at axoloti.shell.CompilePatch.lambda$run$0(CompilePatch.java:67)
	at java.base/java.lang.Thread.run(Thread.java:834)

axoloti.shell.ExecutionFailedException
axoloti.shell.ExecutionFailedException
	at axoloti.shell.CompilePatch.run(CompilePatch.java:75)
	at axoloti.live.patch.PatchViewLive.lambda$goLive$7(PatchViewLive.java:275)
	at axoloti.job.JobProcessor.lambda$exec$0(JobProcessor.java:21)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Hey @Korb. Both spilink and axoloti_control are disabled. spilink was an attempt Johannes made at a feature that would allow communication between devices over spi. As far as I know if was never released publicly. axoloti_control refers not to the third party device, but to hardware that Johannes was developing.

What’s confusing here is that it’s somehow getting into those libraries. There’s going to be something obviously wrong that just needs to be updated in the TIAR libraries for compatibility.

Can you open an issue on the community library repo for me? https://github.com/zrna-research/akso-community/issues

Include the patch you’re running, this full log trace and any relevant details about your system.

What are the exact OLED objects you’re using from TIAR’s library?

~/Library/Akso/akso-community/objects/tiar/HW/OLED128x64lite.axo

The problem isn’t specific to the OLED object at all. It originates in Axoloti’s particular weird concept of “modules.”

Compilation is dying here simply because of sed being unavailable for those two text processing commands in Makefile.patch. This is resulting in some kind of syntactical mismatch in the generated code that is just breaking every subsequent thing. CreateProcess implies Windows, right? It’s likely that we want to do this substitution elsewhere rather than relying on sed at all. sed is a Unix command.

I’m on the case.

Yes, the OP is running Windows. But the absence of ‘sed’ on Windows isn’t the cause of all those compiler errors. I get the same result on Mac OS (10.14.6) as in the OP, except without the few lines about sed.

That’s good to know that sed isn’t the full extent of it. Not clear without digging a bit more if that substitution is even load-bearing or not.

error: expected '}' before numeric constant

We’re basically generating garbage at some point that isn’t parseable as valid C++.

This is a longer discussion but this points to how brittle the code generation architecture is fundamentally. In the future, there should be no generation or compilation per patch operation unless object definitions actually need to be updated on the remote device.

Is your source code for Patcher and firmware up on Github?

I haven’t looked deeply at this, but I think we’re seeing a clash between creating an enumeration for LCDWIDTH when LCDWIDTH had already been #define’d.

Unrelated - I wonder why compilation and upload is noticeably slower on Akso than on Axoloti.

Code is here: https://github.com/zrna-research/akso. I would like nothing more than to have more active contributors fixing issues like this as they come up. A part of getting there might be providing more in depth documentation of the existing system.

There could be a lot of reasons for a perceived change in “Go Live” performance. It could vary by patch. There is no particular technical reason why it should be slower at the hardware level. That’s good data for me though that it feels slower to you though. Can you open a ticket with a specific patch example and a break down of the timing of each phase? I want to try to compare phase by phase to isolate the slow down.

Another thing that could be happening here: you’re experiencing changes that occurred between 1.0.12 and where the fork was made that were never widely used (were only publicly visible in 2.0). There certainly could have been performance regressions in that period.

Edit: opened ticket here https://github.com/zrna-research/akso/issues/7. See notes there. @tele_player, the Github issue system is the ideal place to capture bugs/issues/enhancement ideas. Feel free to open tickets over there as things come up.