Closed K0ertis closed 6 years ago
hi K0ertis,
first of all sorry for this inconvenience! Unfortunately I am not an expert on Makefiles, so mine are not very good. The problem seems to be that the output folder (=device name) is not present. Either you create it by hand, or you call the shell script "_UX_compile_run.sh". I normally use the latter, because the script is a one-click solution to compile and upload the result via SWIM or bootloader to the STM8. Please let me know if this answers your question!?
Having said that, I would very much appreciate any support in improving the Makefiles! Actually I have another STM8 project, where I would need auto-dependency detection (like Arduino). It's not yet on Github, mainly because I'm struggling with the Makefiles... Interested?
Regards, Georg
hello again,
just updated the Makefiles to create the output folder. Now it should work with 'make all'. Wasn't so complicated, after all :-) Have fun!
Regards, Georg
Hi!
I downloaded the SPL from STM and extract it under tmp/ As well with your files which I extracted into tmp: so all your files with apply_patch.sh the patches and the folder STM8S_StdPeriph_Lib are on the same level. Afterwards I run sh apply_patch.sh and it looked good:
patching file ./STM8S_StdPeriph_Lib/Doxyfile patching file ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/inc/stm8s.h File ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src/stm8s_flash.c is read-only; trying to patch anyway patching file ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src/stm8s_flash.c File ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src/stm8s_i2c.c is read-only; trying to patch anyway patching file ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src/stm8s_i2c.c File ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src/stm8s_itc.c is read-only; trying to patch anyway patching file ./STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/src/stm8s_itc.c patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/ADC2/ADC2_ContinuousConversion/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/ADC2/ADC2_ContinuousConversion/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/AWU/AWU_ActiveHaltMode/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/AWU/AWU_ActiveHaltMode/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/BEEP/BEEP_3SignalsGeneration/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/BEEP/BEEP_3SignalsGeneration/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CAN/CAN_Networking/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CAN/CAN_Networking/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CLK/CLK_ClockSecuritySystem/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CLK/CLK_ClockSecuritySystem/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CLK/CLK_ClockSelection/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CLK/CLK_ClockSelection/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CLK/CLK_MaxSpeed/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/CLK/CLK_MaxSpeed/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/EXTI/EXTI_InterruptPriority/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/EXTI/EXTI_InterruptPriority/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_ByteReadWriteOperation/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_ByteReadWriteOperation/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_DataProgram/main.c patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_DataProgram/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_DataProgram/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_WriteWordOperation/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/FLASH/FLASH_WriteWordOperation/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/GPIO/GPIO_Toggle/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/GPIO/GPIO_Toggle/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/I2C/I2C_EEPROM/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/I2C/I2C_EEPROM/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/I2C/I2C_TwoBoards/I2C_DataExchange/Master/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/I2C/I2C_TwoBoards/I2C_DataExchange/Master/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/I2C/I2C_TwoBoards/I2C_DataExchange/Slave/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/I2C/I2C_TwoBoards/I2C_DataExchange/Slave/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/ITC/ITC_SoftwarePriority/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/ITC/ITC_SoftwarePriority/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/RST/RST_IllegalOpcode/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/RST/RST_IllegalOpcode/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/SPI/SPI_FastCommunicationMicroSD/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/SPI/SPI_FastCommunicationMicroSD/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/SPI/SPI_FullDuplexUART1/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/SPI/SPI_FullDuplexUART1/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/SPI/SPI_SimplexLCD/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/SPI/SPI_SimplexLCD/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_6Steps/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_6Steps/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_7PWM_Output/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_7PWM_Output/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_ComplementarySignals_DeadTime_Break_Lock/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_ComplementarySignals_DeadTime_Break_Lock/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_Input_Capture/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_Input_Capture/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_Sinewave_Generation/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM1/TIM1_Sinewave_Generation/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM2/TIM2_OC_ActiveMode/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM2/TIM2_OC_ActiveMode/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM2/TIM2_OC_InactiveMode/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM2/TIM2_OC_InactiveMode/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM2/TIM2_PWM_DutyCycleConfiguration/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM2/TIM2_PWM_DutyCycleConfiguration/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM5/TIM5_Synchronisation_With_TIM6/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/TIM5/TIM5_Synchronisation_With_TIM6/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_HalfDuplex/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_HalfDuplex/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_HyperTerminal_Interrupt/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_HyperTerminal_Interrupt/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Interrupt/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Interrupt/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_IrDA/Receive/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_IrDA/Receive/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_IrDA/Transmit/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_IrDA/Transmit/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_MultiProcessor/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_MultiProcessor/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Printf/main.c patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Printf/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Printf/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Synchronous/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/UART1/UART1_Synchronous/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/WWDG/WWDG_Example/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/WWDG/WWDG_Example/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/readme.txt patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/SDCC/Makefile patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/SDCC/_UX_clean.sh patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/SDCC/_UX_compile_run.sh patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/SDCC/_WIN_clean.bat patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/SDCC/_WIN_compile_run.bat patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/SDCC/_WIN_upload.bat patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/stm8s_it.c patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/main.c patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/SDCC/Makefile patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/SDCC/_UX_clean.sh patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/SDCC/_UX_compile_run.sh patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/SDCC/_WIN_clean.bat patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/SDCC/_WIN_compile_run.bat patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/stm8s_conf.h patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/stm8s_it.c patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/stm8s_it.h patching file ./STM8S_StdPeriph_Lib/Readme.md
Now when I go under
and get this error on make all:
sdcc -mstm8 -lstm8 --opt-code-size -I.. -I../../../Libraries/STM8S_StdPeriph_Driver/inc -I../../../Utilities/STM8S_EVAL -I../../../Utilities/STM8S_EVAL/Common -I../../../Utilities/STM8S_EVAL/STM8-128_EVAL -DSTM8S105 -c ../stm8s_it.c -o STM8S105/stm8s_it.rel ../stm8s_it.c:506: error 4: 'fopen' failed on file 'STM8S105/stm8s_it.asm' Makefile:72: recipe for target 'STM8S105/stm8s_it.rel' failed make: *** [STM8S105/stm8s_it.rel] Error 1
Further I dont understand which stm8s_conf.h I should use, are those all the same in your folders or modified versions?
I have sdcc 3.6 on Ubuntu 16.04