Custom object lost link to table - HELP!


#1

Hello :slight_smile:

I am trying to make a combined object, consisting of 2 objects, the table/load & string/index.

At first it worked, but after I saved the patch, it would not go live anymore. I think I all ready know what the issue is, the object has lost its link to the table, so it wont load. I get this error:

......... xpatch.cpp:2:38: fatal error: chibios/ext/fatfs/src/ff.h: No such file or directory

But how do I fix that?

Any help appreciated!


#2

try putting 0:/wt/2048 (you give the full directory path to the object)


#3

I just tried that and it did no difference. I always use as shown in the picture and it has always worked like that, so I am pretty confident that is not the issue.

I remember seeing somewhere in here that embedding some specific objects will make the loose their reference or link to something. I think it was the table. but not 100% sure.

@thetechnobear I think I remember seeing you comment on this somewhere in here.

Here is the full error:

Generate code complete
Start creating directory on sdcard : /Table index 3 WORKS
creating dir: /Table index 3 WORKS
Done creating directory
Changing working directory on sdcard : /Table index 3 WORKS
Change working directory: /Table index 3 WORKS
Done changing working directory
Start compiling patch
Compiling patch... with /Applications/Axoloti.app/Contents/Java/firmware
BDIR = /Users/jakobskouborg/Documents/axoloti/build
FIRMWARE = .
RM
rm -f /Users/jakobskouborg/Documents/axoloti/build/xpatch.o /Users/jakobskouborg/Documents/axoloti/build/xpatch.elf /Users/jakobskouborg/Documents/axoloti/build/xpatch.bin /Users/jakobskouborg/Documents/axoloti/build/xpatch.d /Users/jakobskouborg/Documents/axoloti/build/xpatch.map /Users/jakobskouborg/Documents/axoloti/build/xpatch.lst
APP
arm-none-eabi-g++ -nostdlib -fno-exceptions -fno-rtti -mcpu=cortex-m4 -O3 -fomit-frame-pointer -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -Wunused-parameter -DCORTEX_USE_FPU=TRUE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB -std=c++11 -DARM_MATH_CM4 -D__FPU_PRESENT -fno-math-errno -fno-threadsafe-statics -H -I/Applications/Axoloti.app/Contents/Java/CMSIS/Include -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/common/ARMCMx/CMSIS/include -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/common/ARMCMx -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/GCC/ARMCMx -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/GCC/ARMCMx/STM32F4xx -I/Applications/Axoloti.app/Contents/Java/chibios/os/kernel/include -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/include -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32F4xx -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/GPIOv2 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/I2Cv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/OTGv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/RTCv2 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/SPIv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/TIMv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/USARTv1 -I/Applications/Axoloti.app/Contents/Java/chibios/boards/ST_STM32F4_DISCOVERY -I/Applications/Axoloti.app/Contents/Java/chibios/ext/fatfs/src -I. -I/Applications/Axoloti.app/Contents/Java/chibios -Winvalid-pch -MD -MP --include /Users/jakobskouborg/Documents/axoloti/build/xpatch.h -c /Users/jakobskouborg/Documents/axoloti/build/xpatch.cpp -o /Users/jakobskouborg/Documents/axoloti/build/xpatch.o
! /Users/jakobskouborg/Documents/axoloti/build/xpatch.h.gch
/Users/jakobskouborg/Documents/axoloti/build/xpatch.cpp:2:38: fatal error: chibios/ext/fatfs/src/ff.h: No such file or directory
#include "chibios/ext/fatfs/src/ff.h"
^
compilation terminated.
make: *** [/Users/jakobskouborg/Documents/axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 2
Compiling patch failed ( /Users/jakobskouborg/Documents/Axoloti OWN/Jaffy Jaf (1.0.11)/0. Favourites/Old/0. Working on.../+custom objects+/Table indiex/Table index 3 WORKS.axp )


#4

you need a dependancy of fatfs

your object should end up with 2 lines in the xml

      <includes>
         <include>chibios/ext/fatfs/src/ff.h</include>
      </includes>
      <depends>
         <depend>fatfs</depend>
      </depends>

you can see this in any factory object which uses the file i/o


#5

@thetechnobear

Cool man, will give it a go. It is a bit weird it is like that, cause I just copied the code form existing objects, so it should work and it did when I first made it.

I just checked the code and those 2 lines are there, see picture.

Here is patch, if someone with better coding skills than I would look into it:
Table index 4.axp (4.1 KB)


#6

I'd like to add that it doesnt apply to my object only. If you take the factory table/load and embed it, save the patch and then close the patch and open it again, you get the same error. I just tested that.

This error is from the patch from this picture:

Error:

Generate code complete
Start creating directory on sdcard : /ada
creating dir: /ada
Done creating directory
Changing working directory on sdcard : /ada
Change working directory: /ada
Done changing working directory
Start compiling patch
Compiling patch... with /Applications/Axoloti.app/Contents/Java/firmware
BDIR = /Users/jakobskouborg/Documents/axoloti/build
FIRMWARE = .
RM
rm -f /Users/jakobskouborg/Documents/axoloti/build/xpatch.o /Users/jakobskouborg/Documents/axoloti/build/xpatch.elf /Users/jakobskouborg/Documents/axoloti/build/xpatch.bin /Users/jakobskouborg/Documents/axoloti/build/xpatch.d /Users/jakobskouborg/Documents/axoloti/build/xpatch.map /Users/jakobskouborg/Documents/axoloti/build/xpatch.lst
APP
arm-none-eabi-g++ -nostdlib -fno-exceptions -fno-rtti -mcpu=cortex-m4 -O3 -fomit-frame-pointer -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -Wunused-parameter -DCORTEX_USE_FPU=TRUE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB -std=c++11 -DARM_MATH_CM4 -D__FPU_PRESENT -fno-math-errno -fno-threadsafe-statics -H -I/Applications/Axoloti.app/Contents/Java/CMSIS/Include -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/common/ARMCMx/CMSIS/include -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/common/ARMCMx -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/GCC/ARMCMx -I/Applications/Axoloti.app/Contents/Java/chibios/os/ports/GCC/ARMCMx/STM32F4xx -I/Applications/Axoloti.app/Contents/Java/chibios/os/kernel/include -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/include -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32F4xx -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/GPIOv2 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/I2Cv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/OTGv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/RTCv2 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/SPIv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/TIMv1 -I/Applications/Axoloti.app/Contents/Java/chibios/os/hal/platforms/STM32/USARTv1 -I/Applications/Axoloti.app/Contents/Java/chibios/boards/ST_STM32F4_DISCOVERY -I/Applications/Axoloti.app/Contents/Java/chibios/ext/fatfs/src -I. -I/Applications/Axoloti.app/Contents/Java/chibios -Winvalid-pch -MD -MP --include /Users/jakobskouborg/Documents/axoloti/build/xpatch.h -c /Users/jakobskouborg/Documents/axoloti/build/xpatch.cpp -o /Users/jakobskouborg/Documents/axoloti/build/xpatch.o
! /Users/jakobskouborg/Documents/axoloti/build/xpatch.h.gch
/Users/jakobskouborg/Documents/axoloti/build/xpatch.cpp:2:38: fatal error: chibios/ext/fatfs/src/ff.h: No such file or directory
#include "chibios/ext/fatfs/src/ff.h"
^
compilation terminated.
make: *** [/Users/jakobskouborg/Documents/axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 2
Compiling patch failed ( /Users/jakobskouborg/Documents/Axoloti OWN/Jaffy Jaf (1.0.11)/0. Favourites/Old/0. Working on.../+custom objects+/Table indiex/ada.axp )


#7

Ahhhhh, figured it out.

I "Copy to library" and made it an .axo object, then it worked. As embedded object it doesnt work.

Nice to know this.


#8

yeah, its not working on embedded objects.

there are a couple of limitations for embedded objects, that need to be 'fixed'


#9

Now that I know about it, it is not that big of a deal :wink:

Thanks :wink: