repetto74 Posted November 23, 2019 Share Posted November 23, 2019 (edited) Hi guys, I am in the process of building the FINALGROM99 card as I do feel confident now with smd soldering after some successfull trials. Despite the fact that I am ok with the hardware part I do have a weak side which is sofware related. As explained by Ralph on his GitHub, a compile action is needed to build the files to be used to program both the Atmega328 and the CPLD. I do have installed Python 2.7 and downloaded the xdt99 suite but I am stuck as I do not know exactly where to insert the first command line : $ cd ti/ $ ./make.py Is that from the python console or the Windows 10 console?? Is there a more detailed guide on how to compile the files?? Thanks Rick Edited November 23, 2019 by repetto74 2 Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted November 23, 2019 Share Posted November 23, 2019 Those commands are written for either Linux or Mac. On Windows, use the Windows Command Prompt and use backslashes instead of forward slashes. You need to be in the root of the repository (wherever you cloned or unzipped the download) before running the commands. 2 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 23, 2019 Author Share Posted November 23, 2019 1 hour ago, InfiniteTape said: Those commands are written for either Linux or Mac. On Windows, use the Windows Command Prompt and use backslashes instead of forward slashes. You need to be in the root of the repository (wherever you cloned or unzipped the download) before running the commands. Thanks a lot for your explanation InfiniteTape this looks more clear to me now. I do have a mac so I tried to compile (I have installed Python 2.7.17 OSX) using the Terminal. I do get this error. Last login: Sun Nov 24 00:17:28 on ttys000 Mac-mini:~ $ cd /Users/rick/Desktop/finalgrom99-master Mac-mini:finalgrom99-master $ cd ti/ Mac-mini:ti $ ./make.py Traceback (most recent call last): File "./make.py", line 11, in <module> if call(xas + ["menu.a99"], shell=False): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Mac-mini:ti $ Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted November 24, 2019 Share Posted November 24, 2019 You need to have xdt99 installed and in your path. Add a line like this to the file ~/.bash_profile export PATH=/Users/brian/Documents/endlos99/xdt99:$PATH Be sure to load a fresh terminal after you make that change. Then you'll need to update the make.py file to point to the xdt99 lib files. Near the top of the file, you'll see a line like this: xas = ["xas99.py", "-b", "-R", "-I", "/Users/brian/Documents/endlos99/xdt99/lib/"] Change that path to the path to your xdt99/lib folder. 1 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 24, 2019 Author Share Posted November 24, 2019 (edited) 10 hours ago, InfiniteTape said: You need to have xdt99 installed and in your path. Add a line like this to the file ~/.bash_profile export PATH=/Users/brian/Documents/endlos99/xdt99:$PATH Be sure to load a fresh terminal after you make that change. Then you'll need to update the make.py file to point to the xdt99 lib files. Near the top of the file, you'll see a line like this: xas = ["xas99.py", "-b", "-R", "-I", "/Users/brian/Documents/endlos99/xdt99/lib/"] Change that path to the path to your xdt99/lib folder. Hi InfiniteTape, Ok the second part where I have to update the make.py Python executable is fine. I can use Pycharm installed on OSX and update the path to the lib folder of the xdt99 main folder. The first part I do not catch exactly how I am supposed to install the xdt99? I have downloaded a folder as per attached screenshot. Where can I find the ~/.bash_profile file in order to add the PATH to xdt99 folder? Sorry for asking my knowledge on unix command lines is somehow limited. Rick Edited November 24, 2019 by repetto74 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted November 24, 2019 Share Posted November 24, 2019 .bash_profile or .profile are hidden files in your home directory. (All Unix files starting with a period are hidden; show them with ls -a.) It depends on the Unix flavor and used shell which of the files actually set the PATH. You can use any text editor to change them. Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 24, 2019 Author Share Posted November 24, 2019 16 minutes ago, mizapf said: .bash_profile or .profile are hidden files in your home directory. (All Unix files starting with a period are hidden; show them with ls -a.) It depends on the Unix flavor and used shell which of the files actually set the PATH. You can use any text editor to change them. Thanks mizapf. ls -a will list hidden files then I had to set the option to show hidden files on Mac OS High Sierra and I do have this file visible now :-). Ok I will try with the guide of InfiniteTape and cross my fingers ? 1 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 24, 2019 Author Share Posted November 24, 2019 (edited) I went a step further but getting a different error when compiling.... Traceback (most recent call last): File "./make.py", line 11, in <module> if call(xas + ["menu.a99"], shell=False): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 13] Permission denied Here is below the batch profile file : # Setting PATH for Python 3.7 # The original version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}" export PATH # Setting PATH for Python 2.7 # The original version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH export PATH="/Users/Desktop/finalgrom99/xdt99:${PATH}" maybe a syntax mistake on the added line ? Edited November 24, 2019 by repetto74 Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted November 24, 2019 Share Posted November 24, 2019 1 hour ago, repetto74 said: OSError: [Errno 13] Permission denied Can you do the following command and post the output? I'm wondering if there's a file executable bit problem. ls -l /Users/Desktop/finalgrom99/xdt99 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 24, 2019 Author Share Posted November 24, 2019 18 minutes ago, InfiniteTape said: Can you do the following command and post the output? I'm wondering if there's a file executable bit problem. ls -l /Users/Desktop/finalgrom99/xdt99 Here it is Mac-mini-de-RICCARDO-4:ti riccardorepetto$ ls -l /Users/riccardorepetto/Desktop/finalgrom99/xdt99 total 728 -rw-rw----@ 1 riccardorepetto staff 18092 8 jui 13:32 COPYING drwxrwx---@ 9 riccardorepetto staff 306 8 jui 14:31 doc drwxrwx---@ 7 riccardorepetto staff 238 8 jui 13:54 example drwxrwx---@ 6 riccardorepetto staff 204 8 jui 13:32 ide drwxrwx---@ 23 riccardorepetto staff 782 8 jui 13:55 lib -rw-rw----@ 1 riccardorepetto staff 87554 8 jui 14:31 xas99.py -rw-rw----@ 1 riccardorepetto staff 21608 8 jui 14:31 xbas99.py -rw-rw----@ 1 riccardorepetto staff 32619 8 jui 14:31 xda99.py -rw-rw----@ 1 riccardorepetto staff 41737 8 jui 14:31 xdg99.py -rw-rw----@ 1 riccardorepetto staff 45983 8 jui 14:31 xdm99.py -rw-rw----@ 1 riccardorepetto staff 64059 8 jui 14:31 xga99.py -rw-r-----@ 1 riccardorepetto staff 29341 8 jui 14:31 xhm99.py -rw-r-----@ 1 riccardorepetto staff 11687 8 jui 14:31 xvm99.py Mac-mini-de-RICCARDO-4:ti riccardorepetto$ Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted November 24, 2019 Share Posted November 24, 2019 For some reason, your py files aren't marked as executable. Run this command in that folder. chmod +x *.py Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 24, 2019 Author Share Posted November 24, 2019 (edited) 10 minutes ago, InfiniteTape said: For some reason, your py files aren't marked as executable. Run this command in that folder. chmod +x *.py That did the trick apparently ? Last login: Sun Nov 24 20:01:19 on ttys001 Mac-mini-de-RICCARDO-4:~ riccardorepetto$ cd /Users/riccardorepetto/Desktop/finalgrom99 Mac-mini-de-RICCARDO-4:finalgrom99 riccardorepetto$ cd ti/ Mac-mini-de-RICCARDO-4:ti riccardorepetto$ ./make.py > browser.a99 <2> 0218 - Warning: Possible branch/jump optimization Warning: Unreferenced constants: C_FF Mac-mini-de-RICCARDO-4:ti riccardorepetto$ Now I have the TI folder with help.bin and menu.bin files created. Hope this is what I should expect ? Edited November 24, 2019 by repetto74 1 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 24, 2019 Author Share Posted November 24, 2019 Now I tried step 2 with the compile of the microcontroller and bootloader code in avr/ Getting again an error message. I suppose that the bash_profile file needs to be updated also? Mac-mini-de-RICCARDO-4:ti riccardorepetto$ cd /Users/riccardorepetto/Desktop/finalgrom99 Mac-mini-de-RICCARDO-4:finalgrom99 riccardorepetto$ cd avr/ Mac-mini-de-RICCARDO-4:avr riccardorepetto$ make rm -f update.avr rm -f finalgrom.hex rm -f finalgrom.eep rm -f finalgrom.obj rm -f finalgrom.cof rm -f finalgrom.elf rm -f finalgrom.map rm -f finalgrom.obj rm -f finalgrom.a90 rm -f finalgrom.sym rm -f finalgrom.lnk rm -f finalgrom.lss rm -f finalgrom.o loader.o wire.o lib/pff.o lib/diskio.o jtag/ports.o jtag/lenval.o jtag/micro.o rm -f finalgrom.lst loader.lst wire.lst lib/pff.lst lib/diskio.lst jtag/ports.lst jtag/lenval.lst jtag/micro.lst rm -f finalgrom.s loader.s wire.s lib/pff.s lib/diskio.s jtag/ports.s jtag/lenval.s jtag/micro.s rm -f finalgrom.d loader.d wire.d lib/pff.d lib/diskio.d jtag/ports.d jtag/lenval.d jtag/micro.d rm -f .dep/* Compiling: finalgrom.c avr-gcc -c -mmcu=atmega328p -I. -g -D F_CPU=8000000L -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=finalgrom.lst -std=gnu99 -MD -MP -MF .dep/finalgrom.o.d finalgrom.c -o finalgrom.o make: avr-gcc: No such file or directory make: *** [finalgrom.o] Error 1 Mac-mini-de-RICCARDO-4:avr riccardorepetto$ Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted November 25, 2019 Share Posted November 25, 2019 You'll need the AVR toolchain installed. You can get it through Homebrew. brew install avr-gcc But if you look a little further down in the FinalGROM, you'll need Windows or Linux to program the CPLD. Hopefully you have one available. Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 25, 2019 Author Share Posted November 25, 2019 8 hours ago, InfiniteTape said: You'll need the AVR toolchain installed. You can get it through Homebrew. brew install avr-gcc But if you look a little further down in the FinalGROM, you'll need Windows or Linux to program the CPLD. Hopefully you have one available. Thanks InfiniteTape :-). Yes I do have a WIndows 10 running through bootcamp on the Mac so it should be ok. I will install this Homebrew package installer with this command : /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Then, brew install avr-gcc. Sounds good ? Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 25, 2019 Author Share Posted November 25, 2019 (edited) Well... Homebrew install went well but this is the result when I try to install avr-gcc ?. Could be the name of the avr package has changed? Mac-mini-de-RICCARDO-4:~ riccardorepetto$ brew install avr-gcc Error: No available formula with the name "avr-gcc" ==> Searching for a previously deleted formula (in the last month)... Warning: homebrew/core is shallow clone. To get complete history run: git -C "$(brew --repo homebrew/core)" fetch --unshallow Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps. Mac-mini-de-RICCARDO-4:~ riccardorepetto$ Edited November 25, 2019 by repetto74 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 25, 2019 Author Share Posted November 25, 2019 I have found this installation guide http://maxembedded.com/2015/06/setting-up-avr-gcc-toolchain-on-linux-and-mac-os-x/ I will give it a try. Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 25, 2019 Author Share Posted November 25, 2019 (edited) Nope I tried to follow this the above installation guide but keep gettings errors.... ? I cannot install the avr-libc. Mac-mini-de-RICCARDO-4:~ riccardorepetto$ brew tap osx-cross/avr Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae eslint jenkins librsvg node ==> Tapping osx-cross/avr Cloning into '/usr/local/Homebrew/Library/Taps/osx-cross/homebrew-avr'... remote: Enumerating objects: 36, done. remote: Counting objects: 100% (36/36), done. remote: Compressing objects: 100% (34/34), done. remote: Total 36 (delta 7), reused 12 (delta 0), pack-reused 0 Unpacking objects: 100% (36/36), done. Tapped 10 formulae (85 files, 134.4KB). Mac-mini-de-RICCARDO-4:~ riccardorepetto$ brew install avr-libc Error: No available formula with the name "avr-libc" ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps. Mac-mini-de-RICCARDO-4:~ riccardorepetto$ UPDATE: the command to run has changed, I need to run brew tap osx-cross/avr && brew install avr-gcc That installed the avr-gcc succesfully apparently. Will test the compile now ? Edited November 25, 2019 by repetto74 Quote Link to comment Share on other sites More sharing options...
repetto74 Posted November 25, 2019 Author Share Posted November 25, 2019 That did the trick ? I have finally the package.hex built Packaging Bootloader and cart firmware: package.hex head -n -1 ../finalgrom.hex | cat - bootload.hex > package.hex head: illegal line count -- -1 bootload.elf : section size addr .data 12 8388864 .text 4136 28672 .bss 173 8388876 .comment 17 0 .note.gnu.avr.deviceinfo 64 0 .debug_aranges 296 0 .debug_info 8549 0 .debug_abbrev 3421 0 .debug_line 10417 0 .debug_frame 892 0 .debug_str 1757 0 .debug_loc 5864 0 .debug_ranges 456 0 Total 36054 Mac-mini-de-RICCARDO-4:boot riccardorepetto$ Thanks a lot for your help InfiniteTape much appreciated ! Quote Link to comment Share on other sites More sharing options...
Mehridian Sanders Posted December 8, 2019 Share Posted December 8, 2019 This! Thank you!Sent from my ASUS_P00J using Tapatalk Quote Link to comment Share on other sites More sharing options...
Mehridian Sanders Posted January 1, 2020 Share Posted January 1, 2020 .bash_profile or .profile are hidden files in your home directory. (All Unix files starting with a period are hidden; show them with ls -a.) It depends on the Unix flavor and used shell which of the files actually set the PATH. You can use any text editor to change them.@mizapf If you're using RPI linux how would you edit your path? This is the current hang up. I made sure I had 2.7 python installed but am getting the same error as above Errno 2Sent from my SM-G955U using Tapatalk Quote Link to comment Share on other sites More sharing options...
+mizapf Posted January 1, 2020 Share Posted January 1, 2020 I don't have too much experience in Python programming; your problem seems to be calling another Python script from this Python script. Maybe someone else could chime in. Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted January 2, 2020 Share Posted January 2, 2020 3 hours ago, Mehridian Sanders said: @mizapf If you're using RPI linux how would you edit your path? This is the current hang up. I made sure I had 2.7 python installed but am getting the same error as above Errno 2 Assuming by "RPI linux" you mean Raspbian and that you haven't changed the defaults, you're likely running the bash shell. Try putting this in /home/pi/.bash_profile: export PATH="/Users/pi/finalgrom99/xdt99-master:${PATH}" 1 Quote Link to comment Share on other sites More sharing options...
Mehridian Sanders Posted January 2, 2020 Share Posted January 2, 2020 (edited) I checked the for the file in the directory listed pi@raspberrypi:~ $ cd /home/pi/ pi@raspberrypi:~ $ ls -a . .claws-mail .gnupg .pp_backup .Xauthority .. .config .local .profile .xsession-errors .bash_history Desktop MagPi Public .xsession-errors.old .bash_logout Documents Music Templates .bashrc Downloads Pictures .thumbnails .cache finalgrom .pki Videos pi@raspberrypi:~ $ Couldn't find the file. Is there a way to create it? oh damn my work buddy reformatted this to Buster... ok lemme put Raspbian on here. Edited January 2, 2020 by Mehridian Sanders Quote Link to comment Share on other sites More sharing options...
+mizapf Posted January 2, 2020 Share Posted January 2, 2020 The config files are ".profile", ".bashrc", or ".bash_profile". To clarify: The ".profile" file is executed when you log into your machine, and it applies to various shells (including the bash, which you seem to use). The ".bash_profile" is a specific bash configuration file which overrides the ".profile". So if you have a ".profile", you do not need a .bash_profile. The .bashrc file is executed whenever you open a shell; this may happen many times after you log into your machine. So you have to add the "PATH" setting to the end of your .profile. Either you open the file with an editor of your choice (I suppose it is not vi ? ), write export PATH=$PATH:/home/pi/finalgrom99/xdt99-master as the last line, save it. Or you do the following outside of the editor, in the shell: echo "export PATH=$PATH:/home/pi/finalgrom99/xdt99-master" >> .profile The ">>" adds the echoed text to the end of the file specified behind. Then log out and log in again. 1 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.
Note: Your post will require moderator approval before it will be visible.