{"id":438,"date":"2025-02-04T16:17:06","date_gmt":"2025-02-04T16:17:06","guid":{"rendered":"https:\/\/metajack.org\/blog\/?p=438"},"modified":"2025-02-04T16:47:33","modified_gmt":"2025-02-04T16:47:33","slug":"compiling-mutable-instruments-peaks-on-osx-sonoma","status":"publish","type":"post","link":"http:\/\/metajack.org\/blog\/2025\/02\/04\/compiling-mutable-instruments-peaks-on-osx-sonoma\/","title":{"rendered":"Compiling Mutable Instruments Peaks on osx Sonoma"},"content":{"rendered":"\n<p>Very rough notes on modifying peaks using a 2025 era apple os.<\/p>\n\n\n\n<p><br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew tap ArmMbed\/homebrew-formulae\nbrew install cmake dfu-util arm-none-eabi-gcc\nbrew install arm-none-eabi-gcc\nbrew tap osx-cross\/arm\nbrew install arm-gcc-bin\n\n# Get the firmware:\n\ngit clone --recurse-submodules https:\/\/github.com\/pichenettes\/eurorack.git mutable_instruments_eurorack\ncd mutable_instruments_eurorack\/peaks\ncd ..\ngit submodule update --init --recursive\n\ncd peaks\nln -s ..\/stmlib stmlib\n\ncd ..\n\ngit clone https:\/\/github.com\/timchurches\/Mutated-Mutables\/\n\ngit submodule update --init --recursive\n\ncd peaks\nln -s ..\/stmlib stmlib\n# i think this may have failed so I copied it from the original repo\nrsync -a ..\/mutable_instruments_eurorack\/stmlib .\nrsync -a ..\/stmlib .\n\n\n# update the makefile\n# you must edit the make file to point to the toolchain in \/opt\n\nTOOLCHAIN_PATH ?= \/opt\/homebrew\/\n\n<\/code><\/pre>\n\n\n\n<p>edit the peaks\/makefile<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>F_CRYSTAL      = 8000000L\nF_CPU          = 72000000L\nSYSCLOCK       = SYSCLK_FREQ_72MHz\nFAMILY         = f10x\nDENSITY        = md\nMEMORY_MODE    = flash\n# USB            = enabled\n\nAPPLICATION    = TRUE\nBOOTLOADER     = peaks_bootloader\n\n# Preferred upload command\nUPLOAD_COMMAND  = upload_combo_jtag\n\n# Packages to build\nTARGET         = peaks\nPACKAGES       = peaks \\\n\t\tpeaks\/drivers \\\n\t\tpeaks\/drums \\\n\t\tpeaks\/modulations \\\n\t\tpeaks\/number_station \\\n\t\tpeaks\/pulse_processor \\\n\t\tstmlib\/utils \\\n\t\tstmlib\/system\nRESOURCES      = peaks\/resources\n\nTOOLCHAIN_PATH ?= \/opt\/homebrew\/\n\nEXTRA_INCLUDES = -I\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/arm-none-eabi\/include \\\n                -I\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/lib\/arm-none-eabi\/include \\\n                -I\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/arm-none-eabi\/include\/c++\/10.3.1 \\\n                -I\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/arm-none-eabi\/include\/c++\/10.3.1\/arm-none-eabi\n\n# Add these library paths                                                                                                                                                                                             \nEXTRA_LIBS = -L\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/arm-none-eabi\/lib \\\n             -L\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/lib\/gcc\/arm-none-eabi\/10.3.1\n\n# Add the path where crt0.o resides                                                                                                                                                                                   \nEXTRA_LDFLAGS = -L\/opt\/homebrew\/Cellar\/arm-gcc-bin@10\/10.3-2021.10_1\/arm-none-eabi\/lib\/thumb\/v7-m\/nofp\n\ninclude stmlib\/makefile.inc\n\n# Rule for building the firmware update file\nwav:  $(TARGET_BIN)\n\tpython stm_audio_bootloader\/fsk\/encoder.py \\\n\t\t-s 48000 -b 16 -n 8 -z 4 -p 256 \\\n\t\t$(TARGET_BIN)\n<\/code><\/pre>\n\n\n\n<p>and the stmlib\/makefile.inc<br><br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># add the line \n# $(EXTRA_INCLUDES) \\\n#\nINCFLAGS = \\\n            \t\t-I. \\\n                        $(EXTRA_INCLUDES) \\\n                        -D$(ARCH_DEFINE) \\\n                        -D$(MODEL_DEFINE) \\\n\t\t\t$(APPLICATION_DEFINE) \\\n                        $(PROJECT_CONFIGURATION) \\\n                        -DF_CPU=$(F_CPU) \\\n                        -DF_CRYSTAL=$(F_CRYSTAL) \\\n                        -DHSE_VALUE=$(F_CRYSTAL) \\\n                        -DUSE_STDPERIPH_DRIVER \\\n\t\t\t-D$(SYSCLOCK)=$(F_CPU)\n<\/code><\/pre>\n\n\n\n<p>and<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>LDFLAGS = \\\n    -Wl,-Map=$(BUILD_DIR)$(TARGET).map \\\n    -Wl,--gc-sections \\\n    -T $(LINKER_SCRIPT) \\\n    $(ARCHFLAGS) \\\n    $(INCFLAGS) \\\n    $(EXTRA_LDFLAGS) \\\n    $(EXTRA_LIBS) \\\n    -L$(STM32_PATH)\n\nLDFLAGS += --specs=nosys.specs --specs=nano.specs<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Very rough notes on modifying peaks using a 2025 era apple os. edit the peaks\/makefile and the stmlib\/makefile.inc and<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-438","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts\/438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/comments?post=438"}],"version-history":[{"count":6,"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":444,"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts\/438\/revisions\/444"}],"wp:attachment":[{"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/media?parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/categories?post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/tags?post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}