<commit_before>#!/bin/bash
code=.
chibios=./dev_16.1.x
#do_templates=yes

#============================================================================#
# Portable Components.                                                       #
#============================================================================#

# Portable Kernel.
echo "Portable Kernel"
if [ ! -d $do_templates ]
then
  cp ${chibios}/os/nil/templates/nilconf.h                  ../portable/NIL_Portable_Kernel_Component/component/cfg/nilconf.h.ftl
fi 
cp -R ${chibios}/os/nil/include                             ../portable/NIL_Portable_Kernel_Component/component/lib
cp -R ${chibios}/os/nil/src                                 ../portable/NIL_Portable_Kernel_Component/component/lib

# Portable OSAL.
echo "Portable OSAL"
cp ${chibios}/os/hal/osal/nil/*.h                           ../portable/NIL_Portable_OSAL_Component/component/lib/include
cp ${chibios}/os/hal/osal/nil/*.c                           ../portable/NIL_Portable_OSAL_Component/component/lib/src

#============================================================================#
# SPC560Dxx Components.                                                      #
#============================================================================#

# SPC560Dxx Kernel Port.
echo "SPC560Dxx Kernel Port"
cp ${code}/ports/e200/cfg/*.ftl                             ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/root_wa/source/isrs/
cp ${chibios}/os/nil/ports/e200/*.h                         ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/*.c                         ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/*.h           ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/ivor.s        ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/compilers/GCC/*.h        ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/compilers/GCC/vectors.s  ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/devices/SPC560Dxx/intc.h ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/devices/SPC560Dxx/ppcparams.h ../SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/


#============================================================================#
# SPC560Bxx Components.                                                      #
#============================================================================#

# SPC560Bxx Kernel Port.
echo "SPC560Bxx Kernel Port"
cp ${code}/ports/e200/cfg/*.ftl                             ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/root_wa/source/isrs/
cp ${chibios}/os/nil/ports/e200/*.h                         ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/*.c                         ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/*.h           ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/ivor.s        ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/compilers/GCC/*.h        ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/compilers/GCC/vectors.s  ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/devices/SPC560Bxx/intc.h ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/devices/SPC560Bxx/ppcparams.h ../SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/

#============================================================================#
# SPC57EMxx HSM Components.                                                  #
#============================================================================#

# SPC57EMxx HSM Kernel Port.
echo "SPC57EMxx HSM Kernel Port"
cp ${code}/ports/e200/cfg/*.ftl                             ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/root_wa/source/isrs/
cp ${chibios}/os/nil/ports/e200/*.h                         ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/*.c                         ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/*.h           ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/ivor.s        ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/compilers/GCC/*.h        ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/compilers/GCC/vectors.s  ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/devices/SPC57EMxx_HSM/ppcparams.h ../SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/

echo ""
echo "Done!"
<commit_msg>Update copysrc.sh<commit_after>#!/bin/bash
code=./_code
chibios=./_code/dev_16.1.x
#do_templates=yes

#============================================================================#
# Portable Components.                                                       #
#============================================================================#

# Portable Kernel.
echo "Portable Kernel"
if [ ! -d $do_templates ]
then
  cp ${chibios}/os/nil/templates/nilconf.h                  ./portable/NIL_Portable_Kernel_Component/component/cfg/nilconf.h.ftl
fi 
cp -R ${chibios}/os/nil/include                             ./portable/NIL_Portable_Kernel_Component/component/lib
cp -R ${chibios}/os/nil/src                                 ./portable/NIL_Portable_Kernel_Component/component/lib

# Portable OSAL.
echo "Portable OSAL"
cp ${chibios}/os/hal/osal/nil/*.h                           ./portable/NIL_Portable_OSAL_Component/component/lib/include
cp ${chibios}/os/hal/osal/nil/*.c                           ./portable/NIL_Portable_OSAL_Component/component/lib/src

#============================================================================#
# SPC560Dxx Components.                                                      #
#============================================================================#

# SPC560Dxx Kernel Port.
echo "SPC560Dxx Kernel Port"
cp ${code}/ports/e200/cfg/*.ftl                             ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/root_wa/source/isrs/
cp ${chibios}/os/nil/ports/e200/*.h                         ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/*.c                         ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/*.h           ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/ivor.s        ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/compilers/GCC/*.h        ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/compilers/GCC/vectors.s  ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/devices/SPC560Dxx/intc.h ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/devices/SPC560Dxx/ppcparams.h ./SPC560Dxx/NIL_SPC560Dxx_Kernel_Port_Component/component/lib/include/


#============================================================================#
# SPC560Bxx Components.                                                      #
#============================================================================#

# SPC560Bxx Kernel Port.
echo "SPC560Bxx Kernel Port"
cp ${code}/ports/e200/cfg/*.ftl                             ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/root_wa/source/isrs/
cp ${chibios}/os/nil/ports/e200/*.h                         ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/*.c                         ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/*.h           ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/ivor.s        ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/compilers/GCC/*.h        ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/compilers/GCC/vectors.s  ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/devices/SPC560Bxx/intc.h ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/devices/SPC560Bxx/ppcparams.h ./SPC560Bxx/NIL_SPC560Bxx_Kernel_Port_Component/component/lib/include/

#============================================================================#
# SPC57EMxx HSM Components.                                                  #
#============================================================================#

# SPC57EMxx HSM Kernel Port.
echo "SPC57EMxx HSM Kernel Port"
cp ${code}/ports/e200/cfg/*.ftl                             ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/root_wa/source/isrs/
cp ${chibios}/os/nil/ports/e200/*.h                         ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/*.c                         ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/*.h           ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/nil/ports/e200/compilers/GCC/ivor.s        ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/compilers/GCC/*.h        ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/compilers/GCC/vectors.s  ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/src/
cp ${chibios}/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/
cp ${chibios}/os/common/ports/e200/devices/SPC57EMxx_HSM/ppcparams.h ./SPC57EMxx_HSM/NIL_SPC57EMxx_HSM_Kernel_Port_Component/component/lib/include/

echo ""
echo "Done!"

{'fraction_non_alphanumeric': 0.22437846539080666, 'fraction_numerical': 0.047934179932033624, 'mean_word_length': 3.269950362733868, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7611388', 'n_tokens_mistral': 4280, 'n_tokens_neox': 3829, 'n_words': 305}