tenbaht / spl-splitter

Compile the ST SPL libraries for STM8 in a linker-friendly way
7 stars 1 forks source link

'make s' and 'make l15' fail to patch #1

Open prosper00 opened 3 years ago

prosper00 commented 3 years ago

I'm following the instructions on your main page, and am stalling at 'make s':

patching file ./STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_test/stm8s_it.h
patching file ./STM8S_StdPeriph_Lib/Readme.md
xargs: fromdos: No such file or directory
patching file STM8S_StdPeriph_Driver/inc/stm8s.h
Hunk #1 FAILED at 222 (different line endings).
Hunk #2 FAILED at 231 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file STM8S_StdPeriph_Driver/inc/stm8s.h.rej@patching file STM8S_StdPeriph_Driver/inc/stm8s_conf.h@Hunk #1 FAILED at 92 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file STM8S_StdPeriph_Driver/inc/stm8s_conf.h.rej@patching file STM8S_StdPeriph_Driver/src/stm8s_clk.c
Hunk #1 FAILED at 45 (different line endings).
Hunk #2 FAILED at 566 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file STM8S_StdPeriph_Driver/src/stm8s_clk.c.rej@patching file STM8S_StdPeriph_Driver/src/stm8s_flash.c
Hunk #1 FAILED at 31 (different line endings).
Hunk #2 FAILED at 99 (different line endings).
Hunk #3 FAILED at 126 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file STM8S_StdPeriph_Driver/src/stm8s_flash.c.rej
patching file STM8S_StdPeriph_Driver/src/stm8s_rst.c@Hunk #1 FAILED at 39 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file STM8S_StdPeriph_Driver/src/stm8s_rst.c.rej
make: *** [Makefile:35: s] Error 1

'make l15' fails too:

patching file ./STM8L15x-16x-05x-AL31-L_StdPeriph_Lib/Utilities/STM8_EVAL/stm8_eval.c
patching file ./STM8L15x-16x-05x-AL31-L_StdPeriph_Lib/Utilities/STM8_EVAL/stm8_eval.h
xargs: fromdos: No such file or directory@patching file STM8L15x_StdPeriph_Driver/src/stm8l15x_flash.c
Hunk #1 FAILED at 129 (different line endings).
Hunk #2 FAILED at 147 (different line endings).
Hunk #3 FAILED at 167 (different line endings).
Hunk #4 FAILED at 175 (different line endings).
Hunk #5 FAILED at 189 (different line endings).
Hunk #6 FAILED at 196 (different line endings).
6 out of 6 hunks FAILED -- saving rejects to file STM8L15x_StdPeriph_Driver/src/stm8l15x_flash.c.rej
patching file STM8L15x_StdPeriph_Driver/src/stm8l15x_clk.c
Hunk #1 FAILED at 71 (different line endings).
Hunk #2 FAILED at 475 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file STM8L15x_StdPeriph_Driver/src/stm8l15x_clk.c.rej
patching file STM8L15x_StdPeriph_Driver/inc/stm8l15x.h
Hunk #1 FAILED at 233 (different line endings).
Hunk #2 FAILED at 242 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file STM8L15x_StdPeriph_Driver/inc/stm8l15x.h.rej
make: *** [Makefile:29: l15] Error 1
prosper00 commented 3 years ago

actually, all the targets are failing with similar errors

prosper00 commented 3 years ago

... installing 'tofrodos' package helps, but it's still failing:

patching file ./STM8S_StdPeriph_Lib/Readme.md
patching file STM8S_StdPeriph_Driver/inc/stm8s.h
Hunk #1 FAILED at 222.
Hunk #2 FAILED at 231.
2 out of 2 hunks FAILED -- saving rejects to file STM8S_StdPeriph_Driver/inc/stm8s.h.rej
patching file STM8S_StdPeriph_Driver/inc/stm8s_conf.h
Hunk #1 succeeded at 94 (offset 2 lines).
patching file STM8S_StdPeriph_Driver/src/stm8s_clk.c
patching file STM8S_StdPeriph_Driver/src/stm8s_flash.c
patching file STM8S_StdPeriph_Driver/src/stm8s_rst.c
for i in STM8AF52Ax STM8AF622x STM8AF626x STM8AF62Ax STM8S001 STM8S003 STM8S005 STM8S007 STM8S103 STM8S105 STM8S207 STM8S208 STM8S903; do ./compile-s.sh $i; done
stm8s.h:2836:101: fatal error: stm8s_it.h: No such file or directory
compilation terminated.

Needed source code modules for CPU STM8AF52Ax:

Library name: STM8AF52Ax.lib
cflags: -mstm8 -DSTM8AF52Ax -I ../STM8S_StdPeriph_Driver/inc --opt-code-size -I.
using build-STM8AF52Ax@compiling stm8s_*.c
at 1: error 258: Failed to open input file 'stm8s_*.c' (No such file or directory)
sdar: *.rel: No such file or directory
stm8s.h:2836:101: fatal error: stm8s_it.h: No such file or directory
compilation terminated.
Needed source code modules for CPU STM8AF622x:

Library name: STM8AF622x.lib
prosper00 commented 3 years ago

I deleted the 01-use_stdint patches (it looks like the SPL SDCC patch already includes stdint), and added a line in the patch.sh: cp -a STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Template/stm8s_it.h $LIBDIR/inc (for the s target)

(for thel15 target, I only had to delete the stdint patch to get it to build)

This (I think) seems to work. I need to do some more testing, but at least things build now