sprintf Posted January 28, 2023 Report Share Posted January 28, 2023 hey , while i was following this tutorial . http://www.midibox.org/dokuwiki/doku.php?id=how_to_create_custom_glcd_fonts_icons_bars_for_midibox_ng it seems its not allowing me to add a new font . is this because the trunk is precompiled ? midibox_ng_v1 username$ make rm -f project.hex Creating object file for app.c Creating object file for mbng_sysex.c Creating object file for mbng_patch.c Creating object file for mbng_event.c Creating object file for mbng_din.c Creating object file for mbng_dout.c Creating object file for mbng_dio.c Creating object file for mbng_rgbled.c Creating object file for mbng_enc.c Creating object file for mbng_ain.c Creating object file for mbng_ainser.c Creating object file for mbng_kb.c Creating object file for mbng_matrix.c Creating object file for mbng_cv.c Creating object file for mbng_mf.c Creating object file for mbng_lcd.c src/mbng_lcd.c: In function 'MBNG_LCD_FontInit': src/mbng_lcd.c:193:31: error: 'GLCD_FONT_JBIG' undeclared (first use in this function) src/mbng_lcd.c:193:31: note: each undeclared identifier is reported only once for each function it appears in make: *** [project_build/src/mbng_lcd.o] Error 1 ---- > the declaration is made according to the tutorial : s32 MBNG_LCD_FontInit(char font_name) { switch( font_name ) { case 'n': glcd_font = (u8 *)GLCD_FONT_NORMAL; break; case 'i': glcd_font = (u8 *)GLCD_FONT_NORMAL_INV; break; case 'b': glcd_font = (u8 *)GLCD_FONT_BIG; break; case 's': glcd_font = (u8 *)GLCD_FONT_SMALL; break; case 't': glcd_font = (u8 *)GLCD_FONT_TINY; break; case 'k': glcd_font = (u8 *)GLCD_FONT_KNOB_ICONS; break; case 'h': glcd_font = (u8 *)GLCD_FONT_METER_ICONS_H; break; case 'v': glcd_font = (u8 *)GLCD_FONT_METER_ICONS_V; break; case 'j': glcd_font = (u8 *)GLCD_FONT_JBIG; break; // <------ HERE ! default: return -1; // unsupported font } ----> the other files have been changed and added as well Could someone please point me in the right direction . What am i missing ? do i have to precompile everything to make this work ? thanks a lot for time and effort in advance. glcd_font.mk glcd_font.h glcd_font_jbig.c glcd_font_jbig.xpm Quote Link to comment Share on other sites More sharing options...
Phatline Posted January 28, 2023 Report Share Posted January 28, 2023 (edited) make clean make ? and change in headerfile: extern const u8 GLCD_FONT_JBIG[]; to extern const u8 glcd_font_jbig[]; in the makefile low and high letter dont cares, but i think in headers you have to write it exact like it is written in the font.c.... (but maybe i am wrong) Edited January 28, 2023 by Phatline Quote Link to comment Share on other sites More sharing options...
sprintf Posted January 28, 2023 Author Report Share Posted January 28, 2023 (edited) thank you very much for your reply . the high and low letters didnt change the problem. i named everything exactly like in the originals. i now tried to just exchange one of the originals with my font files und renaming them . the strange thing is , it compiled properly but the font did not change after the upload . seems im stuck . THIS NOTE makes me wonder . does it mean they are precompiled ? Some prepared Fonts/Icons are located under $MIOS32_PATH/modules/glcd_font They are already compiled into the project if a GLCD driver has been selected (no need to extend the Makefile) o GLCD_FONT_NORMAL (6x8 character set) o GLCD_FONT_SMALL (4x8 character set) o GLCD_FONT_BIG (16x24 character set) o GLCD_FONT_KNOB_ICONS (28x24 round knobs, 12 different icons) o GLCD_FONT_METER_ICONS_H (8x28 horizontal meter bars, 28 icons, 14 with/14 without overload marker) o GLCD_FONT_METER_ICONS_V (32x8 vertical meter bars, 28 icons, 14 with/14 without overload marker) i took a fresh trunk , put my own lcd files , renamed everything according to the present .c and .h files and compiled . still the big font ( the one i exchanged ) is the same as in the original . how is this possible ? are the font files cashed somewhere ? i also went to the bootloader and initialized the glcd . i dont understand where its getting the font from if the glcd_font files have been changed ( they have the same names to be able to compile ) . Edited January 28, 2023 by sprintf Quote Link to comment Share on other sites More sharing options...
Phatline Posted January 28, 2023 Report Share Posted January 28, 2023 you work with local files in the project folder? or do you put the files in the mios-path? if you put your folders in the project folder you have to go a other route: * my example file "tm_V4" >>> try to "make" it, * and study what i have written with "" and <> include "blabla.h" (is a local file - so you have to put the file in this project folder) include <blabla.h> (is a file in the mios path) > so you have to put the file in the mios-path it would be usefull if you zip your project, post it here - to see how you work, and what may the problem is. tm_V4.zip Quote Link to comment Share on other sites More sharing options...
sprintf Posted January 28, 2023 Author Report Share Posted January 28, 2023 (edited) im checking your folder and file structure and reading the .c , .h and make files. ..and comparing things with how i did. im beginning to see the light . i was not aware of the folder structure . in fact i have very little knowledge of programming . i just downloaded the complete trunk from github and went to : mios32/modules/glcd_font ( to add my xpm and .c files and change the files : glcd_font.mk & glcd_font.h accordingly ) and mios32/apps/controllers/midibox_ng_v1/src ( to change mbng_lcd.c ) then i cd into /midibox_ng_v1 and "make" then i got the error from mbng_lcd.c ( which is referring to <glcd_font> ) - as i see you have everything in one folder but you dont use glcd_font.mk (because you adressed the fonts directly in your folder / from your "makefile" ?) ----!!!! i think i understand now what the problem is . my building environment is always referring to my old /svn directory . ( since i just started again after many years to work with all that things ) i will move the new github trunk to the /svn folder and get rid of the old trunk. lets see , i think this should fix it . ( you are helping me a lot to understand the whole "c compiling / folder structure) Edited January 28, 2023 by sprintf Quote Link to comment Share on other sites More sharing options...
sprintf Posted January 28, 2023 Author Report Share Posted January 28, 2023 it works now !!! YAY. YOU MADE MY WEEKEND !!! you seriously made my understanding of things much better !!!!! THANK YOU SO MUCH. i owe you some nice food and beer ( if you drink some ) Quote Link to comment Share on other sites More sharing options...
Phatline Posted January 28, 2023 Report Share Posted January 28, 2023 (edited) passt scho ; ) next quest - michi. Edited January 29, 2023 by Phatline Quote Link to comment Share on other sites More sharing options...
sprintf Posted February 4, 2023 Author Report Share Posted February 4, 2023 ich hätte da noch eine andere Frage . Bisher habe ich mit einem LPC Core gearbeitet. Es soll aber demnächst auch ein STM32F4 Core her . Muss ich die Toolchain um die apps zu compilen dann jedesmal umstellen . e.g export MIOS32_FAMILY=LPC17xx export MIOS32_PROCESSOR=LPC1769 export MIOS32_BOARD=MBHP_CORE_LPC17 .. export MIOS32_FAMILY=STM32F4xx export MIOS32_PROCESSOR=STM32F407VG export MIOS32_BOARD=MBHP_CORE_STM32F4 oder kann ich 2 Toolchain profile haben (mit verschiedenen Pfaden ) ? lg , jascha Quote Link to comment Share on other sites More sharing options...
Phatline Posted February 4, 2023 Report Share Posted February 4, 2023 (edited) linux oder windows oder mac? hab bisher nur in linux gearbeitet, da geh ich immer auf: /etc/environment und kopier dann immer für STM32: PATH="/home/autark/midibox/gcc-arm-none-eabi/bin:/home/autark/program:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/autark/app:/home/autark/midibox/gcc-arm-none-eabi/arm-none-eabi/bin" MIOS32_PATH=/home/autark/midibox/mios32 MIOS32_BIN_PATH=/home/autark/midibox/mios32/bin MIOS32_BOARD=MBHP_CORE_STM32F4 MIOS32_FAMILY=STM32F4xx MIOS32_GCC_PREFIX=arm-none-eabi MIOS32_PROCESSOR=STM32F407VG MIOS32_LCD=universal und für LPC PATH="/home/autark/midibox/gcc-arm-none-eabi/bin:/home/autark/program:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/autark/app:/home/autark/midibox/gcc-arm-none-eabi/arm-none-eabi/bin" MIOS32_PATH=/home/autark/midibox/mios32 MIOS32_BIN_PATH=/home/autark/midibox/mios32/bin MIOS32_BOARD=MBHP_CORE_LPC17 MIOS32_FAMILY=LPC17xx MIOS32_GCC_PREFIX=arm-none-eabi MIOS32_PROCESSOR=LPC1769 MIOS32_LCD=universal rein (ich hab mir diese textblöcke abgelegt, und wo abgespeichert, das ich nur noch copy paste machen muss), ich vermute unter windows kannst dir einen script schreiben, der die entsprechende Variable EXPORTIERT, z.b. auch mit einen einfachen dos-fenster, wost den skript startest, und lpc oder stm reinschreibst, und dann wirds exportiert... aber wie genau? keine ahnung, und MAC 0 ahnung. und starte dann neu, ab da an sind meine SYSTEM VARIABLEN (zu linux: environment variables) dauerhaft gespeichert... falls ich dann ein älteres projekt wieder bearbeite, stell ich auf LPC um, und starte neu... ...aber hast schon recht... das ist müßig... war ich bisher zufaul mir mein leben zu erleichtern ;) Edited February 4, 2023 by Phatline Quote Link to comment Share on other sites More sharing options...
sprintf Posted February 5, 2023 Author Report Share Posted February 5, 2023 vielen dank , dann habe ich das richtig gedacht. so werde ich es auch machen . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.