├── .gitignore ├── README.md ├── firmware ├── .mxproject ├── Drivers │ ├── CMSIS │ │ ├── Core │ │ │ ├── Include │ │ │ │ ├── cmsis_armcc.h │ │ │ │ ├── cmsis_armclang.h │ │ │ │ ├── cmsis_compiler.h │ │ │ │ ├── cmsis_gcc.h │ │ │ │ ├── cmsis_iccarm.h │ │ │ │ ├── cmsis_version.h │ │ │ │ ├── core_armv8mbl.h │ │ │ │ ├── core_armv8mml.h │ │ │ │ ├── core_cm0.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cm1.h │ │ │ │ ├── core_cm23.h │ │ │ │ ├── core_cm3.h │ │ │ │ ├── core_cm33.h │ │ │ │ ├── core_cm4.h │ │ │ │ ├── core_cm7.h │ │ │ │ ├── core_sc000.h │ │ │ │ ├── core_sc300.h │ │ │ │ ├── mpu_armv7.h │ │ │ │ ├── mpu_armv8.h │ │ │ │ └── tz_context.h │ │ │ └── Template │ │ │ │ └── ARMv8-M │ │ │ │ ├── main_s.c │ │ │ │ └── tz_context.c │ │ ├── Core_A │ │ │ ├── Include │ │ │ │ ├── cmsis_armcc.h │ │ │ │ ├── cmsis_armclang.h │ │ │ │ ├── cmsis_compiler.h │ │ │ │ ├── cmsis_cp15.h │ │ │ │ ├── cmsis_gcc.h │ │ │ │ ├── cmsis_iccarm.h │ │ │ │ ├── core_ca.h │ │ │ │ └── irq_ctrl.h │ │ │ └── Source │ │ │ │ └── irq_ctrl_gic.c │ │ ├── DSP │ │ │ ├── DSP_Lib_TestSuite │ │ │ │ ├── Common │ │ │ │ │ ├── JTest │ │ │ │ │ │ ├── inc │ │ │ │ │ │ │ ├── arr_desc │ │ │ │ │ │ │ │ └── arr_desc.h │ │ │ │ │ │ │ ├── jtest.h │ │ │ │ │ │ │ ├── jtest_cycle.h │ │ │ │ │ │ │ ├── jtest_define.h │ │ │ │ │ │ │ ├── jtest_fw.h │ │ │ │ │ │ │ ├── jtest_group.h │ │ │ │ │ │ │ ├── jtest_group_call.h │ │ │ │ │ │ │ ├── jtest_group_define.h │ │ │ │ │ │ │ ├── jtest_pf.h │ │ │ │ │ │ │ ├── jtest_systick.h │ │ │ │ │ │ │ ├── jtest_test.h │ │ │ │ │ │ │ ├── jtest_test_call.h │ │ │ │ │ │ │ ├── jtest_test_define.h │ │ │ │ │ │ │ ├── jtest_test_ret.h │ │ │ │ │ │ │ ├── jtest_util.h │ │ │ │ │ │ │ ├── opt_arg │ │ │ │ │ │ │ │ ├── opt_arg.h │ │ │ │ │ │ │ │ ├── pp_narg.h │ │ │ │ │ │ │ │ └── splice.h │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ │ └── util.h │ │ │ │ │ │ └── src │ │ │ │ │ │ │ ├── jtest_cycle.c │ │ │ │ │ │ │ ├── jtest_dump_str_segments.c │ │ │ │ │ │ │ ├── jtest_fw.c │ │ │ │ │ │ │ └── jtest_trigger_action.c │ │ │ │ │ ├── inc │ │ │ │ │ │ ├── all_tests.h │ │ │ │ │ │ ├── basic_math_tests │ │ │ │ │ │ │ ├── basic_math_templates.h │ │ │ │ │ │ │ ├── basic_math_test_data.h │ │ │ │ │ │ │ ├── basic_math_test_group.h │ │ │ │ │ │ │ └── basic_math_tests.h │ │ │ │ │ │ ├── complex_math_tests │ │ │ │ │ │ │ ├── complex_math_templates.h │ │ │ │ │ │ │ ├── complex_math_test_data.h │ │ │ │ │ │ │ ├── complex_math_test_group.h │ │ │ │ │ │ │ └── complex_math_tests.h │ │ │ │ │ │ ├── controller_tests │ │ │ │ │ │ │ ├── controller_templates.h │ │ │ │ │ │ │ ├── controller_test_data.h │ │ │ │ │ │ │ ├── controller_test_group.h │ │ │ │ │ │ │ └── controller_tests.h │ │ │ │ │ │ ├── fast_math_tests │ │ │ │ │ │ │ ├── fast_math_templates.h │ │ │ │ │ │ │ ├── fast_math_test_data.h │ │ │ │ │ │ │ └── fast_math_test_group.h │ │ │ │ │ │ ├── filtering_tests │ │ │ │ │ │ │ ├── filtering_templates.h │ │ │ │ │ │ │ ├── filtering_test_data.h │ │ │ │ │ │ │ ├── filtering_test_group.h │ │ │ │ │ │ │ └── filtering_tests.h │ │ │ │ │ │ ├── intrinsics_tests │ │ │ │ │ │ │ ├── intrinsics_templates.h │ │ │ │ │ │ │ ├── intrinsics_test_data.h │ │ │ │ │ │ │ └── intrinsics_test_group.h │ │ │ │ │ │ ├── math_helper.h │ │ │ │ │ │ ├── matrix_tests │ │ │ │ │ │ │ ├── matrix_templates.h │ │ │ │ │ │ │ ├── matrix_test_data.h │ │ │ │ │ │ │ ├── matrix_test_group.h │ │ │ │ │ │ │ └── matrix_tests.h │ │ │ │ │ │ ├── statistics_tests │ │ │ │ │ │ │ ├── statistics_templates.h │ │ │ │ │ │ │ ├── statistics_test_data.h │ │ │ │ │ │ │ ├── statistics_test_group.h │ │ │ │ │ │ │ └── statistics_tests.h │ │ │ │ │ │ ├── support_tests │ │ │ │ │ │ │ ├── support_templates.h │ │ │ │ │ │ │ ├── support_test_data.h │ │ │ │ │ │ │ ├── support_test_group.h │ │ │ │ │ │ │ └── support_tests.h │ │ │ │ │ │ ├── templates │ │ │ │ │ │ │ ├── template.h │ │ │ │ │ │ │ └── test_templates.h │ │ │ │ │ │ ├── transform_tests │ │ │ │ │ │ │ ├── transform_templates.h │ │ │ │ │ │ │ ├── transform_test_data.h │ │ │ │ │ │ │ ├── transform_test_group.h │ │ │ │ │ │ │ └── transform_tests.h │ │ │ │ │ │ └── type_abbrev.h │ │ │ │ │ ├── platform │ │ │ │ │ │ ├── ARMCC │ │ │ │ │ │ │ ├── Retarget.c │ │ │ │ │ │ │ ├── startup_armv6-m.s │ │ │ │ │ │ │ └── startup_armv7-m.s │ │ │ │ │ │ ├── ARMCLANG │ │ │ │ │ │ │ ├── startup_armv6-m.S │ │ │ │ │ │ │ └── startup_armv7-m.S │ │ │ │ │ │ ├── GCC │ │ │ │ │ │ │ ├── Retarget.c │ │ │ │ │ │ │ ├── startup_armv6-m.S │ │ │ │ │ │ │ └── startup_armv7-m.S │ │ │ │ │ │ ├── startup_generic.S │ │ │ │ │ │ ├── system_ARMCM0.c │ │ │ │ │ │ ├── system_ARMCM23.c │ │ │ │ │ │ ├── system_ARMCM3.c │ │ │ │ │ │ ├── system_ARMCM33.c │ │ │ │ │ │ ├── system_ARMCM4.c │ │ │ │ │ │ ├── system_ARMCM7.c │ │ │ │ │ │ ├── system_ARMSC000.c │ │ │ │ │ │ ├── system_ARMSC300.c │ │ │ │ │ │ ├── system_ARMv8MBL.c │ │ │ │ │ │ ├── system_ARMv8MML.c │ │ │ │ │ │ └── system_generic.c │ │ │ │ │ └── src │ │ │ │ │ │ ├── all_tests.c │ │ │ │ │ │ ├── basic_math_tests │ │ │ │ │ │ ├── abs_tests.c │ │ │ │ │ │ ├── add_tests.c │ │ │ │ │ │ ├── basic_math_test_common_data.c │ │ │ │ │ │ ├── basic_math_test_group.c │ │ │ │ │ │ ├── dot_prod_tests.c │ │ │ │ │ │ ├── mult_tests.c │ │ │ │ │ │ ├── negate_tests.c │ │ │ │ │ │ ├── offset_tests.c │ │ │ │ │ │ ├── scale_tests.c │ │ │ │ │ │ ├── shift_tests.c │ │ │ │ │ │ └── sub_tests.c │ │ │ │ │ │ ├── complex_math_tests │ │ │ │ │ │ ├── cmplx_conj_tests.c │ │ │ │ │ │ ├── cmplx_dot_prod_tests.c │ │ │ │ │ │ ├── cmplx_mag_squared_tests.c │ │ │ │ │ │ ├── cmplx_mag_tests.c │ │ │ │ │ │ ├── cmplx_mult_cmplx_tests.c │ │ │ │ │ │ ├── cmplx_mult_real_test.c │ │ │ │ │ │ ├── complex_math_test_common_data.c │ │ │ │ │ │ └── complex_math_test_group.c │ │ │ │ │ │ ├── controller_tests │ │ │ │ │ │ ├── controller_test_common_data.c │ │ │ │ │ │ ├── controller_test_group.c │ │ │ │ │ │ ├── pid_reset_tests.c │ │ │ │ │ │ ├── pid_tests.c │ │ │ │ │ │ └── sin_cos_tests.c │ │ │ │ │ │ ├── fast_math_tests │ │ │ │ │ │ ├── fast_math_tests.c │ │ │ │ │ │ └── fast_math_tests_common_data.c │ │ │ │ │ │ ├── filtering_tests │ │ │ │ │ │ ├── biquad_tests.c │ │ │ │ │ │ ├── conv_tests.c │ │ │ │ │ │ ├── correlate_tests.c │ │ │ │ │ │ ├── filtering_test_common_data.c │ │ │ │ │ │ ├── filtering_test_group.c │ │ │ │ │ │ ├── fir_tests.c │ │ │ │ │ │ ├── iir_tests.c │ │ │ │ │ │ └── lms_tests.c │ │ │ │ │ │ ├── intrinsics_tests │ │ │ │ │ │ ├── intrinsics_tests.c │ │ │ │ │ │ └── intrinsics_tests_common_data.c │ │ │ │ │ │ ├── main.c │ │ │ │ │ │ ├── math_helper.c │ │ │ │ │ │ ├── matrix_tests │ │ │ │ │ │ ├── mat_add_tests.c │ │ │ │ │ │ ├── mat_cmplx_mult_tests.c │ │ │ │ │ │ ├── mat_init_tests.c │ │ │ │ │ │ ├── mat_inverse_tests.c │ │ │ │ │ │ ├── mat_mult_fast_tests.c │ │ │ │ │ │ ├── mat_mult_tests.c │ │ │ │ │ │ ├── mat_scale_tests.c │ │ │ │ │ │ ├── mat_sub_tests.c │ │ │ │ │ │ ├── mat_trans_tests.c │ │ │ │ │ │ ├── matrix_test_common_data.c │ │ │ │ │ │ └── matrix_test_group.c │ │ │ │ │ │ ├── statistics_tests │ │ │ │ │ │ ├── max_tests.c │ │ │ │ │ │ ├── mean_tests.c │ │ │ │ │ │ ├── min_tests.c │ │ │ │ │ │ ├── power_tests.c │ │ │ │ │ │ ├── rms_tests.c │ │ │ │ │ │ ├── statistics_test_common_data.c │ │ │ │ │ │ ├── statistics_test_group.c │ │ │ │ │ │ ├── std_tests.c │ │ │ │ │ │ └── var_tests.c │ │ │ │ │ │ ├── support_tests │ │ │ │ │ │ ├── copy_tests.c │ │ │ │ │ │ ├── fill_tests.c │ │ │ │ │ │ ├── support_test_common_data.c │ │ │ │ │ │ ├── support_test_group.c │ │ │ │ │ │ └── x_to_y_tests.c │ │ │ │ │ │ └── transform_tests │ │ │ │ │ │ ├── cfft_family_tests.c │ │ │ │ │ │ ├── cfft_tests.c │ │ │ │ │ │ ├── dct4_tests.c │ │ │ │ │ │ ├── rfft_fast_tests.c │ │ │ │ │ │ ├── rfft_tests.c │ │ │ │ │ │ ├── transform_test_group.c │ │ │ │ │ │ └── transform_tests_common_data.c │ │ │ │ └── RefLibs │ │ │ │ │ ├── inc │ │ │ │ │ └── ref.h │ │ │ │ │ └── src │ │ │ │ │ ├── BasicMathFunctions │ │ │ │ │ ├── abs.c │ │ │ │ │ ├── add.c │ │ │ │ │ ├── dot_prod.c │ │ │ │ │ ├── mult.c │ │ │ │ │ ├── negate.c │ │ │ │ │ ├── offset.c │ │ │ │ │ ├── scale.c │ │ │ │ │ ├── shift.c │ │ │ │ │ └── sub.c │ │ │ │ │ ├── ComplexMathFunctions │ │ │ │ │ ├── cmplx_conj.c │ │ │ │ │ ├── cmplx_dot_prod.c │ │ │ │ │ ├── cmplx_mag.c │ │ │ │ │ ├── cmplx_mag_squared.c │ │ │ │ │ ├── cmplx_mult_cmplx.c │ │ │ │ │ └── cmplx_mult_real.c │ │ │ │ │ ├── ControllerFunctions │ │ │ │ │ ├── pid.c │ │ │ │ │ └── sin_cos.c │ │ │ │ │ ├── FastMathFunctions │ │ │ │ │ ├── cos.c │ │ │ │ │ ├── sin.c │ │ │ │ │ └── sqrt.c │ │ │ │ │ ├── FilteringFunctions │ │ │ │ │ ├── biquad.c │ │ │ │ │ ├── conv.c │ │ │ │ │ ├── correlate.c │ │ │ │ │ ├── fir.c │ │ │ │ │ ├── fir_decimate.c │ │ │ │ │ ├── fir_interpolate.c │ │ │ │ │ ├── fir_lattice.c │ │ │ │ │ ├── fir_sparse.c │ │ │ │ │ ├── iir_lattice.c │ │ │ │ │ └── lms.c │ │ │ │ │ ├── HelperFunctions │ │ │ │ │ ├── mat_helper.c │ │ │ │ │ └── ref_helper.c │ │ │ │ │ ├── Intrinsics │ │ │ │ │ └── intrinsics.c │ │ │ │ │ ├── MatrixFunctions │ │ │ │ │ ├── mat_add.c │ │ │ │ │ ├── mat_cmplx_mult.c │ │ │ │ │ ├── mat_inverse.c │ │ │ │ │ ├── mat_mult.c │ │ │ │ │ ├── mat_scale.c │ │ │ │ │ ├── mat_sub.c │ │ │ │ │ └── mat_trans.c │ │ │ │ │ ├── StatisticsFunctions │ │ │ │ │ ├── max.c │ │ │ │ │ ├── mean.c │ │ │ │ │ ├── min.c │ │ │ │ │ ├── power.c │ │ │ │ │ ├── rms.c │ │ │ │ │ ├── std.c │ │ │ │ │ └── var.c │ │ │ │ │ ├── SupportFunctions │ │ │ │ │ ├── copy.c │ │ │ │ │ ├── fill.c │ │ │ │ │ ├── fixed_to_fixed.c │ │ │ │ │ ├── fixed_to_float.c │ │ │ │ │ └── float_to_fixed.c │ │ │ │ │ └── TransformFunctions │ │ │ │ │ ├── bitreversal.c │ │ │ │ │ ├── cfft.c │ │ │ │ │ ├── dct4.c │ │ │ │ │ └── rfft.c │ │ │ ├── Examples │ │ │ │ └── ARM │ │ │ │ │ ├── arm_class_marks_example │ │ │ │ │ └── arm_class_marks_example_f32.c │ │ │ │ │ ├── arm_convolution_example │ │ │ │ │ ├── arm_convolution_example_f32.c │ │ │ │ │ ├── math_helper.c │ │ │ │ │ └── math_helper.h │ │ │ │ │ ├── arm_dotproduct_example │ │ │ │ │ └── arm_dotproduct_example_f32.c │ │ │ │ │ ├── arm_fft_bin_example │ │ │ │ │ ├── arm_fft_bin_data.c │ │ │ │ │ └── arm_fft_bin_example_f32.c │ │ │ │ │ ├── arm_fir_example │ │ │ │ │ ├── arm_fir_data.c │ │ │ │ │ ├── arm_fir_example_f32.c │ │ │ │ │ ├── math_helper.c │ │ │ │ │ └── math_helper.h │ │ │ │ │ ├── arm_graphic_equalizer_example │ │ │ │ │ ├── arm_graphic_equalizer_data.c │ │ │ │ │ ├── arm_graphic_equalizer_example_q31.c │ │ │ │ │ ├── math_helper.c │ │ │ │ │ └── math_helper.h │ │ │ │ │ ├── arm_linear_interp_example │ │ │ │ │ ├── arm_linear_interp_data.c │ │ │ │ │ ├── arm_linear_interp_example_f32.c │ │ │ │ │ ├── math_helper.c │ │ │ │ │ └── math_helper.h │ │ │ │ │ ├── arm_matrix_example │ │ │ │ │ ├── arm_matrix_example_f32.c │ │ │ │ │ ├── math_helper.c │ │ │ │ │ └── math_helper.h │ │ │ │ │ ├── arm_signal_converge_example │ │ │ │ │ ├── arm_signal_converge_data.c │ │ │ │ │ ├── arm_signal_converge_example_f32.c │ │ │ │ │ ├── math_helper.c │ │ │ │ │ └── math_helper.h │ │ │ │ │ ├── arm_sin_cos_example │ │ │ │ │ └── arm_sin_cos_example_f32.c │ │ │ │ │ └── arm_variance_example │ │ │ │ │ └── arm_variance_example_f32.c │ │ │ ├── Include │ │ │ │ ├── arm_common_tables.h │ │ │ │ ├── arm_const_structs.h │ │ │ │ └── arm_math.h │ │ │ └── Source │ │ │ │ ├── BasicMathFunctions │ │ │ │ ├── arm_abs_f32.c │ │ │ │ ├── arm_abs_q15.c │ │ │ │ ├── arm_abs_q31.c │ │ │ │ ├── arm_abs_q7.c │ │ │ │ ├── arm_add_f32.c │ │ │ │ ├── arm_add_q15.c │ │ │ │ ├── arm_add_q31.c │ │ │ │ ├── arm_add_q7.c │ │ │ │ ├── arm_dot_prod_f32.c │ │ │ │ ├── arm_dot_prod_q15.c │ │ │ │ ├── arm_dot_prod_q31.c │ │ │ │ ├── arm_dot_prod_q7.c │ │ │ │ ├── arm_mult_f32.c │ │ │ │ ├── arm_mult_q15.c │ │ │ │ ├── arm_mult_q31.c │ │ │ │ ├── arm_mult_q7.c │ │ │ │ ├── arm_negate_f32.c │ │ │ │ ├── arm_negate_q15.c │ │ │ │ ├── arm_negate_q31.c │ │ │ │ ├── arm_negate_q7.c │ │ │ │ ├── arm_offset_f32.c │ │ │ │ ├── arm_offset_q15.c │ │ │ │ ├── arm_offset_q31.c │ │ │ │ ├── arm_offset_q7.c │ │ │ │ ├── arm_scale_f32.c │ │ │ │ ├── arm_scale_q15.c │ │ │ │ ├── arm_scale_q31.c │ │ │ │ ├── arm_scale_q7.c │ │ │ │ ├── arm_shift_q15.c │ │ │ │ ├── arm_shift_q31.c │ │ │ │ ├── arm_shift_q7.c │ │ │ │ ├── arm_sub_f32.c │ │ │ │ ├── arm_sub_q15.c │ │ │ │ ├── arm_sub_q31.c │ │ │ │ └── arm_sub_q7.c │ │ │ │ ├── CommonTables │ │ │ │ ├── arm_common_tables.c │ │ │ │ └── arm_const_structs.c │ │ │ │ ├── ComplexMathFunctions │ │ │ │ ├── arm_cmplx_conj_f32.c │ │ │ │ ├── arm_cmplx_conj_q15.c │ │ │ │ ├── arm_cmplx_conj_q31.c │ │ │ │ ├── arm_cmplx_dot_prod_f32.c │ │ │ │ ├── arm_cmplx_dot_prod_q15.c │ │ │ │ ├── arm_cmplx_dot_prod_q31.c │ │ │ │ ├── arm_cmplx_mag_f32.c │ │ │ │ ├── arm_cmplx_mag_q15.c │ │ │ │ ├── arm_cmplx_mag_q31.c │ │ │ │ ├── arm_cmplx_mag_squared_f32.c │ │ │ │ ├── arm_cmplx_mag_squared_q15.c │ │ │ │ ├── arm_cmplx_mag_squared_q31.c │ │ │ │ ├── arm_cmplx_mult_cmplx_f32.c │ │ │ │ ├── arm_cmplx_mult_cmplx_q15.c │ │ │ │ ├── arm_cmplx_mult_cmplx_q31.c │ │ │ │ ├── arm_cmplx_mult_real_f32.c │ │ │ │ ├── arm_cmplx_mult_real_q15.c │ │ │ │ └── arm_cmplx_mult_real_q31.c │ │ │ │ ├── ControllerFunctions │ │ │ │ ├── arm_pid_init_f32.c │ │ │ │ ├── arm_pid_init_q15.c │ │ │ │ ├── arm_pid_init_q31.c │ │ │ │ ├── arm_pid_reset_f32.c │ │ │ │ ├── arm_pid_reset_q15.c │ │ │ │ ├── arm_pid_reset_q31.c │ │ │ │ ├── arm_sin_cos_f32.c │ │ │ │ └── arm_sin_cos_q31.c │ │ │ │ ├── FastMathFunctions │ │ │ │ ├── arm_cos_f32.c │ │ │ │ ├── arm_cos_q15.c │ │ │ │ ├── arm_cos_q31.c │ │ │ │ ├── arm_sin_f32.c │ │ │ │ ├── arm_sin_q15.c │ │ │ │ ├── arm_sin_q31.c │ │ │ │ ├── arm_sqrt_q15.c │ │ │ │ └── arm_sqrt_q31.c │ │ │ │ ├── FilteringFunctions │ │ │ │ ├── arm_biquad_cascade_df1_32x64_init_q31.c │ │ │ │ ├── arm_biquad_cascade_df1_32x64_q31.c │ │ │ │ ├── arm_biquad_cascade_df1_f32.c │ │ │ │ ├── arm_biquad_cascade_df1_fast_q15.c │ │ │ │ ├── arm_biquad_cascade_df1_fast_q31.c │ │ │ │ ├── arm_biquad_cascade_df1_init_f32.c │ │ │ │ ├── arm_biquad_cascade_df1_init_q15.c │ │ │ │ ├── arm_biquad_cascade_df1_init_q31.c │ │ │ │ ├── arm_biquad_cascade_df1_q15.c │ │ │ │ ├── arm_biquad_cascade_df1_q31.c │ │ │ │ ├── arm_biquad_cascade_df2T_f32.c │ │ │ │ ├── arm_biquad_cascade_df2T_f64.c │ │ │ │ ├── arm_biquad_cascade_df2T_init_f32.c │ │ │ │ ├── arm_biquad_cascade_df2T_init_f64.c │ │ │ │ ├── arm_biquad_cascade_stereo_df2T_f32.c │ │ │ │ ├── arm_biquad_cascade_stereo_df2T_init_f32.c │ │ │ │ ├── arm_conv_f32.c │ │ │ │ ├── arm_conv_fast_opt_q15.c │ │ │ │ ├── arm_conv_fast_q15.c │ │ │ │ ├── arm_conv_fast_q31.c │ │ │ │ ├── arm_conv_opt_q15.c │ │ │ │ ├── arm_conv_opt_q7.c │ │ │ │ ├── arm_conv_partial_f32.c │ │ │ │ ├── arm_conv_partial_fast_opt_q15.c │ │ │ │ ├── arm_conv_partial_fast_q15.c │ │ │ │ ├── arm_conv_partial_fast_q31.c │ │ │ │ ├── arm_conv_partial_opt_q15.c │ │ │ │ ├── arm_conv_partial_opt_q7.c │ │ │ │ ├── arm_conv_partial_q15.c │ │ │ │ ├── arm_conv_partial_q31.c │ │ │ │ ├── arm_conv_partial_q7.c │ │ │ │ ├── arm_conv_q15.c │ │ │ │ ├── arm_conv_q31.c │ │ │ │ ├── arm_conv_q7.c │ │ │ │ ├── arm_correlate_f32.c │ │ │ │ ├── arm_correlate_fast_opt_q15.c │ │ │ │ ├── arm_correlate_fast_q15.c │ │ │ │ ├── arm_correlate_fast_q31.c │ │ │ │ ├── arm_correlate_opt_q15.c │ │ │ │ ├── arm_correlate_opt_q7.c │ │ │ │ ├── arm_correlate_q15.c │ │ │ │ ├── arm_correlate_q31.c │ │ │ │ ├── arm_correlate_q7.c │ │ │ │ ├── arm_fir_decimate_f32.c │ │ │ │ ├── arm_fir_decimate_fast_q15.c │ │ │ │ ├── arm_fir_decimate_fast_q31.c │ │ │ │ ├── arm_fir_decimate_init_f32.c │ │ │ │ ├── arm_fir_decimate_init_q15.c │ │ │ │ ├── arm_fir_decimate_init_q31.c │ │ │ │ ├── arm_fir_decimate_q15.c │ │ │ │ ├── arm_fir_decimate_q31.c │ │ │ │ ├── arm_fir_f32.c │ │ │ │ ├── arm_fir_fast_q15.c │ │ │ │ ├── arm_fir_fast_q31.c │ │ │ │ ├── arm_fir_init_f32.c │ │ │ │ ├── arm_fir_init_q15.c │ │ │ │ ├── arm_fir_init_q31.c │ │ │ │ ├── arm_fir_init_q7.c │ │ │ │ ├── arm_fir_interpolate_f32.c │ │ │ │ ├── arm_fir_interpolate_init_f32.c │ │ │ │ ├── arm_fir_interpolate_init_q15.c │ │ │ │ ├── arm_fir_interpolate_init_q31.c │ │ │ │ ├── arm_fir_interpolate_q15.c │ │ │ │ ├── arm_fir_interpolate_q31.c │ │ │ │ ├── arm_fir_lattice_f32.c │ │ │ │ ├── arm_fir_lattice_init_f32.c │ │ │ │ ├── arm_fir_lattice_init_q15.c │ │ │ │ ├── arm_fir_lattice_init_q31.c │ │ │ │ ├── arm_fir_lattice_q15.c │ │ │ │ ├── arm_fir_lattice_q31.c │ │ │ │ ├── arm_fir_q15.c │ │ │ │ ├── arm_fir_q31.c │ │ │ │ ├── arm_fir_q7.c │ │ │ │ ├── arm_fir_sparse_f32.c │ │ │ │ ├── arm_fir_sparse_init_f32.c │ │ │ │ ├── arm_fir_sparse_init_q15.c │ │ │ │ ├── arm_fir_sparse_init_q31.c │ │ │ │ ├── arm_fir_sparse_init_q7.c │ │ │ │ ├── arm_fir_sparse_q15.c │ │ │ │ ├── arm_fir_sparse_q31.c │ │ │ │ ├── arm_fir_sparse_q7.c │ │ │ │ ├── arm_iir_lattice_f32.c │ │ │ │ ├── arm_iir_lattice_init_f32.c │ │ │ │ ├── arm_iir_lattice_init_q15.c │ │ │ │ ├── arm_iir_lattice_init_q31.c │ │ │ │ ├── arm_iir_lattice_q15.c │ │ │ │ ├── arm_iir_lattice_q31.c │ │ │ │ ├── arm_lms_f32.c │ │ │ │ ├── arm_lms_init_f32.c │ │ │ │ ├── arm_lms_init_q15.c │ │ │ │ ├── arm_lms_init_q31.c │ │ │ │ ├── arm_lms_norm_f32.c │ │ │ │ ├── arm_lms_norm_init_f32.c │ │ │ │ ├── arm_lms_norm_init_q15.c │ │ │ │ ├── arm_lms_norm_init_q31.c │ │ │ │ ├── arm_lms_norm_q15.c │ │ │ │ ├── arm_lms_norm_q31.c │ │ │ │ ├── arm_lms_q15.c │ │ │ │ └── arm_lms_q31.c │ │ │ │ ├── MatrixFunctions │ │ │ │ ├── arm_mat_add_f32.c │ │ │ │ ├── arm_mat_add_q15.c │ │ │ │ ├── arm_mat_add_q31.c │ │ │ │ ├── arm_mat_cmplx_mult_f32.c │ │ │ │ ├── arm_mat_cmplx_mult_q15.c │ │ │ │ ├── arm_mat_cmplx_mult_q31.c │ │ │ │ ├── arm_mat_init_f32.c │ │ │ │ ├── arm_mat_init_q15.c │ │ │ │ ├── arm_mat_init_q31.c │ │ │ │ ├── arm_mat_inverse_f32.c │ │ │ │ ├── arm_mat_inverse_f64.c │ │ │ │ ├── arm_mat_mult_f32.c │ │ │ │ ├── arm_mat_mult_fast_q15.c │ │ │ │ ├── arm_mat_mult_fast_q31.c │ │ │ │ ├── arm_mat_mult_q15.c │ │ │ │ ├── arm_mat_mult_q31.c │ │ │ │ ├── arm_mat_scale_f32.c │ │ │ │ ├── arm_mat_scale_q15.c │ │ │ │ ├── arm_mat_scale_q31.c │ │ │ │ ├── arm_mat_sub_f32.c │ │ │ │ ├── arm_mat_sub_q15.c │ │ │ │ ├── arm_mat_sub_q31.c │ │ │ │ ├── arm_mat_trans_f32.c │ │ │ │ ├── arm_mat_trans_q15.c │ │ │ │ └── arm_mat_trans_q31.c │ │ │ │ ├── StatisticsFunctions │ │ │ │ ├── arm_max_f32.c │ │ │ │ ├── arm_max_q15.c │ │ │ │ ├── arm_max_q31.c │ │ │ │ ├── arm_max_q7.c │ │ │ │ ├── arm_mean_f32.c │ │ │ │ ├── arm_mean_q15.c │ │ │ │ ├── arm_mean_q31.c │ │ │ │ ├── arm_mean_q7.c │ │ │ │ ├── arm_min_f32.c │ │ │ │ ├── arm_min_q15.c │ │ │ │ ├── arm_min_q31.c │ │ │ │ ├── arm_min_q7.c │ │ │ │ ├── arm_power_f32.c │ │ │ │ ├── arm_power_q15.c │ │ │ │ ├── arm_power_q31.c │ │ │ │ ├── arm_power_q7.c │ │ │ │ ├── arm_rms_f32.c │ │ │ │ ├── arm_rms_q15.c │ │ │ │ ├── arm_rms_q31.c │ │ │ │ ├── arm_std_f32.c │ │ │ │ ├── arm_std_q15.c │ │ │ │ ├── arm_std_q31.c │ │ │ │ ├── arm_var_f32.c │ │ │ │ ├── arm_var_q15.c │ │ │ │ └── arm_var_q31.c │ │ │ │ ├── SupportFunctions │ │ │ │ ├── arm_copy_f32.c │ │ │ │ ├── arm_copy_q15.c │ │ │ │ ├── arm_copy_q31.c │ │ │ │ ├── arm_copy_q7.c │ │ │ │ ├── arm_fill_f32.c │ │ │ │ ├── arm_fill_q15.c │ │ │ │ ├── arm_fill_q31.c │ │ │ │ ├── arm_fill_q7.c │ │ │ │ ├── arm_float_to_q15.c │ │ │ │ ├── arm_float_to_q31.c │ │ │ │ ├── arm_float_to_q7.c │ │ │ │ ├── arm_q15_to_float.c │ │ │ │ ├── arm_q15_to_q31.c │ │ │ │ ├── arm_q15_to_q7.c │ │ │ │ ├── arm_q31_to_float.c │ │ │ │ ├── arm_q31_to_q15.c │ │ │ │ ├── arm_q31_to_q7.c │ │ │ │ ├── arm_q7_to_float.c │ │ │ │ ├── arm_q7_to_q15.c │ │ │ │ └── arm_q7_to_q31.c │ │ │ │ └── TransformFunctions │ │ │ │ ├── arm_bitreversal.c │ │ │ │ ├── arm_bitreversal2.S │ │ │ │ ├── arm_cfft_f32.c │ │ │ │ ├── arm_cfft_q15.c │ │ │ │ ├── arm_cfft_q31.c │ │ │ │ ├── arm_cfft_radix2_f32.c │ │ │ │ ├── arm_cfft_radix2_init_f32.c │ │ │ │ ├── arm_cfft_radix2_init_q15.c │ │ │ │ ├── arm_cfft_radix2_init_q31.c │ │ │ │ ├── arm_cfft_radix2_q15.c │ │ │ │ ├── arm_cfft_radix2_q31.c │ │ │ │ ├── arm_cfft_radix4_f32.c │ │ │ │ ├── arm_cfft_radix4_init_f32.c │ │ │ │ ├── arm_cfft_radix4_init_q15.c │ │ │ │ ├── arm_cfft_radix4_init_q31.c │ │ │ │ ├── arm_cfft_radix4_q15.c │ │ │ │ ├── arm_cfft_radix4_q31.c │ │ │ │ ├── arm_cfft_radix8_f32.c │ │ │ │ ├── arm_dct4_f32.c │ │ │ │ ├── arm_dct4_init_f32.c │ │ │ │ ├── arm_dct4_init_q15.c │ │ │ │ ├── arm_dct4_init_q31.c │ │ │ │ ├── arm_dct4_q15.c │ │ │ │ ├── arm_dct4_q31.c │ │ │ │ ├── arm_rfft_f32.c │ │ │ │ ├── arm_rfft_fast_f32.c │ │ │ │ ├── arm_rfft_fast_init_f32.c │ │ │ │ ├── arm_rfft_init_f32.c │ │ │ │ ├── arm_rfft_init_q15.c │ │ │ │ ├── arm_rfft_init_q31.c │ │ │ │ ├── arm_rfft_q15.c │ │ │ │ └── arm_rfft_q31.c │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F0xx │ │ │ │ ├── Include │ │ │ │ ├── stm32f030x6.h │ │ │ │ ├── stm32f030x8.h │ │ │ │ ├── stm32f030xc.h │ │ │ │ ├── stm32f031x6.h │ │ │ │ ├── stm32f038xx.h │ │ │ │ ├── stm32f042x6.h │ │ │ │ ├── stm32f048xx.h │ │ │ │ ├── stm32f051x8.h │ │ │ │ ├── stm32f058xx.h │ │ │ │ ├── stm32f070x6.h │ │ │ │ ├── stm32f070xb.h │ │ │ │ ├── stm32f071xb.h │ │ │ │ ├── stm32f072xb.h │ │ │ │ ├── stm32f078xx.h │ │ │ │ ├── stm32f091xc.h │ │ │ │ ├── stm32f098xx.h │ │ │ │ ├── stm32f0xx.h │ │ │ │ └── system_stm32f0xx.h │ │ │ │ └── Source │ │ │ │ └── Templates │ │ │ │ ├── arm │ │ │ │ ├── startup_stm32f030x6.s │ │ │ │ ├── startup_stm32f030x8.s │ │ │ │ ├── startup_stm32f030xc.s │ │ │ │ ├── startup_stm32f031x6.s │ │ │ │ ├── startup_stm32f038xx.s │ │ │ │ ├── startup_stm32f042x6.s │ │ │ │ ├── startup_stm32f048xx.s │ │ │ │ ├── startup_stm32f051x8.s │ │ │ │ ├── startup_stm32f058xx.s │ │ │ │ ├── startup_stm32f070x6.s │ │ │ │ ├── startup_stm32f070xb.s │ │ │ │ ├── startup_stm32f071xb.s │ │ │ │ ├── startup_stm32f072xb.s │ │ │ │ ├── startup_stm32f078xx.s │ │ │ │ ├── startup_stm32f091xc.s │ │ │ │ └── startup_stm32f098xx.s │ │ │ │ ├── gcc │ │ │ │ ├── startup_stm32f030x6.s │ │ │ │ ├── startup_stm32f030x8.s │ │ │ │ ├── startup_stm32f030xc.s │ │ │ │ ├── startup_stm32f031x6.s │ │ │ │ ├── startup_stm32f038xx.s │ │ │ │ ├── startup_stm32f042x6.s │ │ │ │ ├── startup_stm32f048xx.s │ │ │ │ ├── startup_stm32f051x8.s │ │ │ │ ├── startup_stm32f058xx.s │ │ │ │ ├── startup_stm32f070x6.s │ │ │ │ ├── startup_stm32f070xb.s │ │ │ │ ├── startup_stm32f071xb.s │ │ │ │ ├── startup_stm32f072xb.s │ │ │ │ ├── startup_stm32f078xx.s │ │ │ │ ├── startup_stm32f091xc.s │ │ │ │ └── startup_stm32f098xx.s │ │ │ │ ├── iar │ │ │ │ ├── linker │ │ │ │ │ ├── stm32f030x6_flash.icf │ │ │ │ │ ├── stm32f030x8_flash.icf │ │ │ │ │ ├── stm32f030xc_flash.icf │ │ │ │ │ ├── stm32f031x6_flash.icf │ │ │ │ │ ├── stm32f038xx_flash.icf │ │ │ │ │ ├── stm32f042x6_flash.icf │ │ │ │ │ ├── stm32f048xx_flash.icf │ │ │ │ │ ├── stm32f051x8_flash.icf │ │ │ │ │ ├── stm32f058xx_flash.icf │ │ │ │ │ ├── stm32f070x6_flash.icf │ │ │ │ │ ├── stm32f070xb_flash.icf │ │ │ │ │ ├── stm32f071xb_flash.icf │ │ │ │ │ ├── stm32f072xb_flash.icf │ │ │ │ │ ├── stm32f078xx_flash.icf │ │ │ │ │ ├── stm32f091xc_flash.icf │ │ │ │ │ ├── stm32f091xc_sram.icf │ │ │ │ │ ├── stm32f098xx_flash.icf │ │ │ │ │ └── stm32f098xx_sram.icf │ │ │ │ ├── startup_stm32f030x6.s │ │ │ │ ├── startup_stm32f030x8.s │ │ │ │ ├── startup_stm32f030xc.s │ │ │ │ ├── startup_stm32f031x6.s │ │ │ │ ├── startup_stm32f038xx.s │ │ │ │ ├── startup_stm32f042x6.s │ │ │ │ ├── startup_stm32f048xx.s │ │ │ │ ├── startup_stm32f051x8.s │ │ │ │ ├── startup_stm32f058xx.s │ │ │ │ ├── startup_stm32f070x6.s │ │ │ │ ├── startup_stm32f070xb.s │ │ │ │ ├── startup_stm32f071xb.s │ │ │ │ ├── startup_stm32f072xb.s │ │ │ │ ├── startup_stm32f078xx.s │ │ │ │ ├── startup_stm32f091xc.s │ │ │ │ └── startup_stm32f098xx.s │ │ │ │ └── system_stm32f0xx.c │ │ ├── Include │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armclang.h │ │ │ ├── cmsis_compiler.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── cmsis_iccarm.h │ │ │ ├── cmsis_version.h │ │ │ ├── core_armv8mbl.h │ │ │ ├── core_armv8mml.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm1.h │ │ │ ├── core_cm23.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm33.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── mpu_armv7.h │ │ │ ├── mpu_armv8.h │ │ │ └── tz_context.h │ │ ├── Lib │ │ │ ├── ARM │ │ │ │ ├── arm_cortexM0b_math.lib │ │ │ │ └── arm_cortexM0l_math.lib │ │ │ ├── GCC │ │ │ │ └── libarm_cortexM0l_math.a │ │ │ └── IAR │ │ │ │ ├── iar_cortexM0b_math.a │ │ │ │ └── iar_cortexM0l_math.a │ │ ├── NN │ │ │ ├── Examples │ │ │ │ └── ARM │ │ │ │ │ └── arm_nn_examples │ │ │ │ │ ├── cifar10 │ │ │ │ │ ├── RTE │ │ │ │ │ │ ├── Compiler │ │ │ │ │ │ │ └── EventRecorderConf.h │ │ │ │ │ │ ├── _ARMCM0 │ │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ │ ├── _ARMCM3 │ │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ │ ├── _ARMCM4_FP │ │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ │ └── _ARMCM7_SP │ │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── arm_nnexamples_cifar10.cpp │ │ │ │ │ ├── arm_nnexamples_cifar10_inputs.h │ │ │ │ │ ├── arm_nnexamples_cifar10_parameter.h │ │ │ │ │ └── arm_nnexamples_cifar10_weights.h │ │ │ │ │ └── gru │ │ │ │ │ ├── RTE │ │ │ │ │ ├── Compiler │ │ │ │ │ │ └── EventRecorderConf.h │ │ │ │ │ ├── _ARMCM0 │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── _ARMCM3 │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── _ARMCM4_FP │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ └── _ARMCM7_SP │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── arm_nnexamples_gru.cpp │ │ │ │ │ └── arm_nnexamples_gru_test_data.h │ │ │ ├── Include │ │ │ │ ├── arm_nn_tables.h │ │ │ │ ├── arm_nnfunctions.h │ │ │ │ └── arm_nnsupportfunctions.h │ │ │ ├── NN_Lib_Tests │ │ │ │ └── nn_test │ │ │ │ │ ├── RTE │ │ │ │ │ ├── _ARMCM0 │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── _ARMCM3 │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── _ARMCM4_FP │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ └── _ARMCM7_SP │ │ │ │ │ │ └── RTE_Components.h │ │ │ │ │ ├── Ref_Implementations │ │ │ │ │ ├── arm_convolve_HWC_q15_ref.c │ │ │ │ │ ├── arm_convolve_HWC_q15_ref_nonsquare.c │ │ │ │ │ ├── arm_convolve_HWC_q7_ref.c │ │ │ │ │ ├── arm_convolve_HWC_q7_ref_nonsquare.c │ │ │ │ │ ├── arm_depthwise_separable_conv_HWC_q7_ref.c │ │ │ │ │ ├── arm_depthwise_separable_conv_HWC_q7_ref_nonsquare.c │ │ │ │ │ ├── arm_fully_connected_mat_q7_vec_q15_opt_ref.c │ │ │ │ │ ├── arm_fully_connected_mat_q7_vec_q15_ref.c │ │ │ │ │ ├── arm_fully_connected_q15_opt_ref.c │ │ │ │ │ ├── arm_fully_connected_q15_ref.c │ │ │ │ │ ├── arm_fully_connected_q7_opt_ref.c │ │ │ │ │ ├── arm_fully_connected_q7_ref.c │ │ │ │ │ ├── arm_nn_mult_ref.c │ │ │ │ │ ├── arm_pool_ref.c │ │ │ │ │ ├── arm_relu_ref.c │ │ │ │ │ ├── fully_connected_testing_weights.h │ │ │ │ │ └── ref_functions.h │ │ │ │ │ ├── arm_nnexamples_nn_test.cpp │ │ │ │ │ └── arm_nnexamples_nn_test.h │ │ │ └── Source │ │ │ │ ├── ActivationFunctions │ │ │ │ ├── arm_nn_activations_q15.c │ │ │ │ ├── arm_nn_activations_q7.c │ │ │ │ ├── arm_relu_q15.c │ │ │ │ └── arm_relu_q7.c │ │ │ │ ├── ConvolutionFunctions │ │ │ │ ├── arm_convolve_1x1_HWC_q7_fast_nonsquare.c │ │ │ │ ├── arm_convolve_HWC_q15_basic.c │ │ │ │ ├── arm_convolve_HWC_q15_fast.c │ │ │ │ ├── arm_convolve_HWC_q15_fast_nonsquare.c │ │ │ │ ├── arm_convolve_HWC_q7_RGB.c │ │ │ │ ├── arm_convolve_HWC_q7_basic.c │ │ │ │ ├── arm_convolve_HWC_q7_basic_nonsquare.c │ │ │ │ ├── arm_convolve_HWC_q7_fast.c │ │ │ │ ├── arm_convolve_HWC_q7_fast_nonsquare.c │ │ │ │ ├── arm_depthwise_separable_conv_HWC_q7.c │ │ │ │ ├── arm_depthwise_separable_conv_HWC_q7_nonsquare.c │ │ │ │ ├── arm_nn_mat_mult_kernel_q7_q15.c │ │ │ │ └── arm_nn_mat_mult_kernel_q7_q15_reordered.c │ │ │ │ ├── FullyConnectedFunctions │ │ │ │ ├── arm_fully_connected_mat_q7_vec_q15.c │ │ │ │ ├── arm_fully_connected_mat_q7_vec_q15_opt.c │ │ │ │ ├── arm_fully_connected_q15.c │ │ │ │ ├── arm_fully_connected_q15_opt.c │ │ │ │ ├── arm_fully_connected_q7.c │ │ │ │ └── arm_fully_connected_q7_opt.c │ │ │ │ ├── NNSupportFunctions │ │ │ │ ├── arm_nn_mult_q15.c │ │ │ │ ├── arm_nn_mult_q7.c │ │ │ │ ├── arm_nntables.c │ │ │ │ ├── arm_q7_to_q15_no_shift.c │ │ │ │ └── arm_q7_to_q15_reordered_no_shift.c │ │ │ │ ├── PoolingFunctions │ │ │ │ └── arm_pool_q7_HWC.c │ │ │ │ └── SoftmaxFunctions │ │ │ │ ├── arm_softmax_q15.c │ │ │ │ └── arm_softmax_q7.c │ │ ├── RTOS │ │ │ └── Template │ │ │ │ └── cmsis_os.h │ │ └── RTOS2 │ │ │ ├── Include │ │ │ ├── cmsis_os2.h │ │ │ └── os_tick.h │ │ │ ├── Source │ │ │ ├── os_systick.c │ │ │ ├── os_tick_gtim.c │ │ │ └── os_tick_ptim.c │ │ │ └── Template │ │ │ ├── cmsis_os.h │ │ │ └── cmsis_os1.c │ └── STM32F0xx_HAL_Driver │ │ ├── Inc │ │ ├── Legacy │ │ │ ├── stm32_hal_legacy.h │ │ │ └── stm32f0xx_hal_can_legacy.h │ │ ├── stm32_assert_template.h │ │ ├── stm32f0xx_hal.h │ │ ├── stm32f0xx_hal_adc.h │ │ ├── stm32f0xx_hal_adc_ex.h │ │ ├── stm32f0xx_hal_can.h │ │ ├── stm32f0xx_hal_cec.h │ │ ├── stm32f0xx_hal_comp.h │ │ ├── stm32f0xx_hal_conf_template.h │ │ ├── stm32f0xx_hal_cortex.h │ │ ├── stm32f0xx_hal_crc.h │ │ ├── stm32f0xx_hal_crc_ex.h │ │ ├── stm32f0xx_hal_dac.h │ │ ├── stm32f0xx_hal_dac_ex.h │ │ ├── stm32f0xx_hal_def.h │ │ ├── stm32f0xx_hal_dma.h │ │ ├── stm32f0xx_hal_dma_ex.h │ │ ├── stm32f0xx_hal_exti.h │ │ ├── stm32f0xx_hal_flash.h │ │ ├── stm32f0xx_hal_flash_ex.h │ │ ├── stm32f0xx_hal_gpio.h │ │ ├── stm32f0xx_hal_gpio_ex.h │ │ ├── stm32f0xx_hal_i2c.h │ │ ├── stm32f0xx_hal_i2c_ex.h │ │ ├── stm32f0xx_hal_i2s.h │ │ ├── stm32f0xx_hal_irda.h │ │ ├── stm32f0xx_hal_irda_ex.h │ │ ├── stm32f0xx_hal_iwdg.h │ │ ├── stm32f0xx_hal_pcd.h │ │ ├── stm32f0xx_hal_pcd_ex.h │ │ ├── stm32f0xx_hal_pwr.h │ │ ├── stm32f0xx_hal_pwr_ex.h │ │ ├── stm32f0xx_hal_rcc.h │ │ ├── stm32f0xx_hal_rcc_ex.h │ │ ├── stm32f0xx_hal_rtc.h │ │ ├── stm32f0xx_hal_rtc_ex.h │ │ ├── stm32f0xx_hal_smartcard.h │ │ ├── stm32f0xx_hal_smartcard_ex.h │ │ ├── stm32f0xx_hal_smbus.h │ │ ├── stm32f0xx_hal_spi.h │ │ ├── stm32f0xx_hal_spi_ex.h │ │ ├── stm32f0xx_hal_tim.h │ │ ├── stm32f0xx_hal_tim_ex.h │ │ ├── stm32f0xx_hal_tsc.h │ │ ├── stm32f0xx_hal_uart.h │ │ ├── stm32f0xx_hal_uart_ex.h │ │ ├── stm32f0xx_hal_usart.h │ │ ├── stm32f0xx_hal_usart_ex.h │ │ ├── stm32f0xx_hal_wwdg.h │ │ ├── stm32f0xx_ll_adc.h │ │ ├── stm32f0xx_ll_bus.h │ │ ├── stm32f0xx_ll_comp.h │ │ ├── stm32f0xx_ll_cortex.h │ │ ├── stm32f0xx_ll_crc.h │ │ ├── stm32f0xx_ll_crs.h │ │ ├── stm32f0xx_ll_dac.h │ │ ├── stm32f0xx_ll_dma.h │ │ ├── stm32f0xx_ll_exti.h │ │ ├── stm32f0xx_ll_gpio.h │ │ ├── stm32f0xx_ll_i2c.h │ │ ├── stm32f0xx_ll_iwdg.h │ │ ├── stm32f0xx_ll_pwr.h │ │ ├── stm32f0xx_ll_rcc.h │ │ ├── stm32f0xx_ll_rtc.h │ │ ├── stm32f0xx_ll_spi.h │ │ ├── stm32f0xx_ll_system.h │ │ ├── stm32f0xx_ll_tim.h │ │ ├── stm32f0xx_ll_usart.h │ │ ├── stm32f0xx_ll_usb.h │ │ ├── stm32f0xx_ll_utils.h │ │ └── stm32f0xx_ll_wwdg.h │ │ └── Src │ │ ├── stm32f0xx_hal.c │ │ ├── stm32f0xx_hal_adc.c │ │ ├── stm32f0xx_hal_adc_ex.c │ │ ├── stm32f0xx_hal_can.c │ │ ├── stm32f0xx_hal_cec.c │ │ ├── stm32f0xx_hal_comp.c │ │ ├── stm32f0xx_hal_cortex.c │ │ ├── stm32f0xx_hal_crc.c │ │ ├── stm32f0xx_hal_crc_ex.c │ │ ├── stm32f0xx_hal_dac.c │ │ ├── stm32f0xx_hal_dac_ex.c │ │ ├── stm32f0xx_hal_dma.c │ │ ├── stm32f0xx_hal_exti.c │ │ ├── stm32f0xx_hal_flash.c │ │ ├── stm32f0xx_hal_flash_ex.c │ │ ├── stm32f0xx_hal_gpio.c │ │ ├── stm32f0xx_hal_i2c.c │ │ ├── stm32f0xx_hal_i2c_ex.c │ │ ├── stm32f0xx_hal_i2s.c │ │ ├── stm32f0xx_hal_irda.c │ │ ├── stm32f0xx_hal_iwdg.c │ │ ├── stm32f0xx_hal_msp_template.c │ │ ├── stm32f0xx_hal_pcd.c │ │ ├── stm32f0xx_hal_pcd_ex.c │ │ ├── stm32f0xx_hal_pwr.c │ │ ├── stm32f0xx_hal_pwr_ex.c │ │ ├── stm32f0xx_hal_rcc.c │ │ ├── stm32f0xx_hal_rcc_ex.c │ │ ├── stm32f0xx_hal_rtc.c │ │ ├── stm32f0xx_hal_rtc_ex.c │ │ ├── stm32f0xx_hal_smartcard.c │ │ ├── stm32f0xx_hal_smartcard_ex.c │ │ ├── stm32f0xx_hal_smbus.c │ │ ├── stm32f0xx_hal_spi.c │ │ ├── stm32f0xx_hal_spi_ex.c │ │ ├── stm32f0xx_hal_tim.c │ │ ├── stm32f0xx_hal_tim_ex.c │ │ ├── stm32f0xx_hal_timebase_rtc_alarm_template.c │ │ ├── stm32f0xx_hal_timebase_rtc_wakeup_template.c │ │ ├── stm32f0xx_hal_timebase_tim_template.c │ │ ├── stm32f0xx_hal_tsc.c │ │ ├── stm32f0xx_hal_uart.c │ │ ├── stm32f0xx_hal_uart_ex.c │ │ ├── stm32f0xx_hal_usart.c │ │ ├── stm32f0xx_hal_usart_ex.c │ │ ├── stm32f0xx_hal_wwdg.c │ │ ├── stm32f0xx_ll_adc.c │ │ ├── stm32f0xx_ll_comp.c │ │ ├── stm32f0xx_ll_crc.c │ │ ├── stm32f0xx_ll_crs.c │ │ ├── stm32f0xx_ll_dac.c │ │ ├── stm32f0xx_ll_dma.c │ │ ├── stm32f0xx_ll_exti.c │ │ ├── stm32f0xx_ll_gpio.c │ │ ├── stm32f0xx_ll_i2c.c │ │ ├── stm32f0xx_ll_pwr.c │ │ ├── stm32f0xx_ll_rcc.c │ │ ├── stm32f0xx_ll_rtc.c │ │ ├── stm32f0xx_ll_spi.c │ │ ├── stm32f0xx_ll_tim.c │ │ ├── stm32f0xx_ll_usart.c │ │ ├── stm32f0xx_ll_usb.c │ │ └── stm32f0xx_ll_utils.c ├── Inc │ ├── fonts.h │ ├── graphics.h │ ├── images │ │ ├── bar.h │ │ ├── bar.png │ │ ├── bar.xcf │ │ ├── bar_i.h │ │ ├── bar_i.png │ │ ├── bar_i.xcf │ │ ├── bb.h │ │ ├── bb.png │ │ ├── bb.xcf │ │ ├── cal_i.h │ │ ├── cal_i.png │ │ ├── cal_n.h │ │ ├── cal_n.png │ │ ├── cal_n.xcf │ │ ├── cnt.h │ │ ├── cnt.png │ │ ├── cnt.xcf │ │ ├── cnt_i.h │ │ ├── cnt_i.png │ │ ├── gram.h │ │ ├── gram.png │ │ ├── gram.xcf │ │ ├── gram_i.h │ │ ├── gram_i.png │ │ ├── image_converter.py │ │ ├── image_header.h │ │ ├── tara.h │ │ ├── tara.png │ │ ├── tara_green.h │ │ ├── tara_green.png │ │ ├── tara_green.xcf │ │ ├── tara_red.h │ │ ├── tara_red.png │ │ └── tara_red.xcf │ ├── main.h │ ├── stm32f0xx_hal_conf.h │ ├── stm32f0xx_it.h │ ├── usbd_cdc_interface.h │ ├── usbd_conf.h │ └── usbd_desc.h ├── Makefile ├── Middlewares │ └── ST │ │ └── STM32_USB_Device_Library │ │ ├── Class │ │ └── CDC │ │ │ ├── Inc │ │ │ ├── usbd_cdc.h │ │ │ └── usbd_cdc_if_template.h │ │ │ └── Src │ │ │ ├── usbd_cdc.c │ │ │ └── usbd_cdc_if_template.c │ │ └── Core │ │ ├── Inc │ │ ├── usbd_conf_template.h │ │ ├── usbd_core.h │ │ ├── usbd_ctlreq.h │ │ ├── usbd_def.h │ │ └── usbd_ioreq.h │ │ └── Src │ │ ├── usbd_conf_template.c │ │ ├── usbd_core.c │ │ ├── usbd_ctlreq.c │ │ └── usbd_ioreq.c ├── STM32F072CBTx_FLASH.ld ├── Src │ ├── font24.c │ ├── graphics.c │ ├── main.c │ ├── stm32f0xx_hal_msp.c │ ├── stm32f0xx_it.c │ ├── system_stm32f0xx.c │ ├── usbd_cdc_interface.c │ ├── usbd_conf.c │ └── usbd_desc.c ├── firmware.ioc ├── otter.jdebug ├── otter.jdebug.user └── startup_stm32f072xb.s ├── gerber ├── scale-B_Cu.gbl ├── scale-B_Mask.gbs ├── scale-B_Paste.gbp ├── scale-B_SilkS.gbo ├── scale-Edge_Cuts.gm1 ├── scale-F_Cu.gtl ├── scale-F_Mask.gts ├── scale-F_Paste.gtp ├── scale-F_SilkS.gto ├── scale-NPTH.drl └── scale-PTH.drl ├── gerber_silk ├── README.md ├── scale-B_Cu.gbl ├── scale-B_Mask.gbs ├── scale-B_Paste.gbp ├── scale-B_SilkS.gbo ├── scale-Edge_Cuts.gm1 ├── scale-F_Cu.gtl ├── scale-F_Mask.gts ├── scale-F_Paste.gtp ├── scale-F_SilkS.gto ├── scale-NPTH.drl ├── scale-PTH.drl └── scale-final.zip ├── images ├── 1.jpeg ├── 2.jpeg └── 3.jpeg ├── scale-cache.lib ├── scale.ioc ├── scale.kicad_pcb ├── scale.pro ├── scale.sch ├── scale.sch-bak ├── silk.svg └── test.py /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/kicad 3 | # Edit at https://www.gitignore.io/?templates=kicad 4 | 5 | ### KiCad ### 6 | # For PCBs designed using KiCad: http://www.kicad-pcb.org/ 7 | # Format documentation: http://kicad-pcb.org/help/file-formats/ 8 | 9 | # Temporary files 10 | *.000 11 | *.bak 12 | *.bck 13 | *.kicad_pcb-bak 14 | *~ 15 | _autosave-* 16 | *.tmp 17 | *-save.pro 18 | *-save.kicad_pcb 19 | fp-info-cache 20 | 21 | # Netlist files (exported from Eeschema) 22 | *.net 23 | 24 | # Autorouter files (exported from Pcbnew) 25 | *.dsn 26 | *.ses 27 | 28 | # Exported BOM files 29 | *.xml 30 | *.csv 31 | 32 | ### KiCad Patch ### 33 | escue-backup/ 34 | 35 | *.tsv 36 | bom/ 37 | 38 | # Gerber export output 39 | out/ 40 | 41 | firmware/build/* 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lab-balance 2 | 3 | This project aims to replace the electronics contained within a [cheap scale from AliExpress](https://aliexpress.com/item/33024586342.html) to archive a higher resolution and hackability. Furthermore I need a scale which does not turn off after 30 seconds of use! 4 | 5 | The goal is not met so far, as the accuracy of the load cell is not sufficient for this task. It can be replaced with a higher end model. 6 | 7 | ![](images/1.jpeg) 8 | 9 | ![](images/2.jpeg) 10 | 11 | ![](images/3.jpeg) 12 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Core/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/jtest.h: -------------------------------------------------------------------------------- 1 | #ifndef _JTEST_H_ 2 | #define _JTEST_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "jtest_fw.h" 9 | #include "jtest_test.h" 10 | #include "jtest_test_define.h" 11 | #include "jtest_test_call.h" 12 | #include "jtest_group.h" 13 | #include "jtest_group_define.h" 14 | #include "jtest_group_call.h" 15 | #include "jtest_cycle.h" 16 | 17 | #endif /* _JTEST_H_ */ 18 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/jtest_define.h: -------------------------------------------------------------------------------- 1 | #ifndef _JTEST_DEFINE_H_ 2 | #define _JTEST_DEFINE_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Macros and Defines */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | /** 9 | * Makes a symbol for use as a struct name. Names made this way have two parts; 10 | * the first parts is a prefix common to all structs of that class. The second 11 | * is a specifier which differs for each instance of that struct type. 12 | */ 13 | #define JTEST_STRUCT_NAME(prefix, specifier) \ 14 | CONCAT(prefix, specifier) 15 | 16 | /** 17 | * Define a struct with type with a name generated by #JTEST_STRUCT_NAME(). 18 | */ 19 | #define JTEST_DEFINE_STRUCT(type, struct_name) \ 20 | type struct_name 21 | 22 | /** 23 | * Declare a struct with type with a name generated by #JTEST_STRUCT_NAME(). 24 | */ 25 | #define JTEST_DECLARE_STRUCT(struct_definition) \ 26 | extern struct_definition 27 | 28 | /** 29 | * Define and initialize a struct (created with JTEST_DEFINE_STRUCT()) and 30 | * initialize it with init_values. 31 | */ 32 | #define JTEST_INIT_STRUCT(struct_definition, init_values) \ 33 | struct_definition = { \ 34 | init_values \ 35 | } 36 | 37 | #endif /* _JTEST_DEFINE_H_ */ 38 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/jtest_test_ret.h: -------------------------------------------------------------------------------- 1 | #ifndef _JTEST_TEST_RET_H_ 2 | #define _JTEST_TEST_RET_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Type Definitions */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | /** 9 | * Values a #JTEST_TEST_t can return. 10 | */ 11 | typedef enum JTEST_TEST_RET_enum 12 | { 13 | JTEST_TEST_PASSED, 14 | JTEST_TEST_FAILED 15 | } JTEST_TEST_RET_t; 16 | 17 | #endif /* _JTEST_TEST_RET_H_ */ 18 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/jtest_util.h: -------------------------------------------------------------------------------- 1 | #ifndef _JTEST_UTIL_H_ 2 | #define _JTEST_UTIL_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "util/util.h" 9 | 10 | /*--------------------------------------------------------------------------------*/ 11 | /* Macros and Defines */ 12 | /*--------------------------------------------------------------------------------*/ 13 | 14 | /* Define boolean values for the framework. */ 15 | #define JTEST_TRUE 1 /**< Value used for TRUE in JTEST. */ 16 | #define JTEST_FALSE 0 /**< Value used for FALSE in JTEST. */ 17 | 18 | /** 19 | * Set the value of the attribute in the struct to by struct_ptr to value. 20 | */ 21 | #define JTEST_SET_STRUCT_ATTRIBUTE(struct_ptr, attribute, value) \ 22 | do \ 23 | { \ 24 | (struct_ptr)->attribute = (value); \ 25 | } while (0) 26 | 27 | #endif /* _JTEST_UTIL_H_ */ 28 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/opt_arg/opt_arg.h: -------------------------------------------------------------------------------- 1 | #ifndef _OPT_ARG_H_ 2 | #define _OPT_ARG_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "pp_narg.h" 9 | #include "splice.h" 10 | 11 | /* If you are Joseph Jaoudi, you have a snippet which expands into an 12 | example. If you are not Joseph, but possess his code, study the examples. If 13 | you have no examples, turn back contact Joseph. */ 14 | 15 | #endif /* _OPT_ARG_H_ */ 16 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/opt_arg/pp_narg.h: -------------------------------------------------------------------------------- 1 | #ifndef _PP_NARG_H_ 2 | #define _PP_NARG_H_ 3 | 4 | #define PP_NARG(...) \ 5 | PP_NARG_(__VA_ARGS__,PP_RSEQ_N()) 6 | #define PP_NARG_(...) \ 7 | PP_ARG_N(__VA_ARGS__) 8 | #define PP_ARG_N( \ 9 | _1, _2, _3, _4, _5, _6, _7, _8, _9,_10, \ 10 | _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \ 11 | _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \ 12 | _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \ 13 | _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \ 14 | _51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \ 15 | _61,_62,_63,N,...) N 16 | #define PP_RSEQ_N() \ 17 | 63,62,61,60, \ 18 | 59,58,57,56,55,54,53,52,51,50, \ 19 | 49,48,47,46,45,44,43,42,41,40, \ 20 | 39,38,37,36,35,34,33,32,31,30, \ 21 | 29,28,27,26,25,24,23,22,21,20, \ 22 | 19,18,17,16,15,14,13,12,11,10, \ 23 | 9,8,7,6,5,4,3,2,1,0 24 | 25 | #endif /* _PP_NARG_H_ */ 26 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/opt_arg/splice.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPLICE_H_ 2 | #define _SPLICE_H_ 3 | 4 | #define SPLICE(a,b) SPLICE_1(a,b) 5 | #define SPLICE_1(a,b) SPLICE_2(a,b) 6 | #define SPLICE_2(a,b) a##b 7 | 8 | #endif /* _SPLICE_H_ */ 9 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/inc/util/util.h: -------------------------------------------------------------------------------- 1 | #ifndef _UTIL_H_ 2 | #define _UTIL_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Macros and Defines */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | /** 9 | * Convert a symbol to a string and add a 'NewLine'. 10 | */ 11 | #define STR_NL(x) STR1_NL(x) 12 | #define STR1_NL(x) (STR2_NL(x)"\n") 13 | #define STR2_NL(x) #x 14 | 15 | /** 16 | * Convert a symbol to a string. 17 | */ 18 | #define STR(x) STR1(x) 19 | #define STR1(x) STR2(x) 20 | #define STR2(x) #x 21 | 22 | /** 23 | * Concatenate two symbols. 24 | */ 25 | #define CONCAT(a, b) CONCAT1(a, b) 26 | #define CONCAT1(a, b) CONCAT2(a, b) 27 | #define CONCAT2(a, b) a##b 28 | 29 | 30 | /** 31 | * Place curly braces around a varaible number of macro arguments. 32 | */ 33 | #define CURLY(...) {__VA_ARGS__} 34 | 35 | /** 36 | * Place parenthesis around a variable number of macro arguments. 37 | */ 38 | #define PAREN(...) (__VA_ARGS__) 39 | 40 | /* Standard min/max macros. */ 41 | #define MIN(x,y) (((x) < (y)) ? (x) : (y) ) 42 | #define MAX(x,y) (((x) > (y)) ? (x) : (y) ) 43 | 44 | /** 45 | * Bound value using low and high limits. 46 | * 47 | * Evaluate to a number in the range, endpoint inclusive. 48 | */ 49 | #define BOUND(low, high, value) \ 50 | MAX(MIN(high, value), low) 51 | 52 | #endif /* _UTIL_H_ */ 53 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/src/jtest_cycle.c: -------------------------------------------------------------------------------- 1 | #include "../inc/jtest_cycle.h" 2 | #include 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Define Module Variables */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | /* const char * JTEST_CYCLE_STRF = "Running: %s\nCycles: %" PRIu32 "\n"; */ 9 | const char * JTEST_CYCLE_STRF = "Cycles: %" PRIu32 "\n"; /* function name + parameter string skipped */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/src/jtest_dump_str_segments.c: -------------------------------------------------------------------------------- 1 | #include "jtest_fw.h" 2 | 3 | /** 4 | * Dump the JTEST_FW.str_buffer the Keil framework in pieces. 5 | * 6 | * The JTEST_FW.str_buffer contains more characters than the Keil framework can 7 | * dump at once. This function dumps them in blocks. 8 | */ 9 | void jtest_dump_str_segments(void) 10 | { 11 | uint32_t seg_idx = 0; 12 | uint32_t memmove_idx = 0; 13 | uint32_t seg_cnt = 14 | (strlen(JTEST_FW.str_buffer) / JTEST_STR_MAX_OUTPUT_SIZE) + 1; 15 | 16 | for( seg_idx = 0; seg_idx < seg_cnt; ++seg_idx) 17 | { 18 | JTEST_TRIGGER_ACTION(dump_str); 19 | 20 | if (seg_idx < JTEST_STR_MAX_OUTPUT_SEGMENTS) 21 | { 22 | memmove_idx = 0; 23 | while (memmove_idx < (seg_cnt - seg_idx -1) ) 24 | { 25 | memmove( 26 | JTEST_FW.str_buffer+ 27 | (memmove_idx* JTEST_STR_MAX_OUTPUT_SIZE), 28 | JTEST_FW.str_buffer+ 29 | ((memmove_idx+1)*JTEST_STR_MAX_OUTPUT_SIZE), 30 | JTEST_BUF_SIZE); 31 | ++memmove_idx; 32 | } 33 | } 34 | } 35 | return; 36 | } 37 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/src/jtest_fw.c: -------------------------------------------------------------------------------- 1 | #include "../inc/jtest.h" 2 | 3 | /*--------------------------------------------------------------------------------*/ 4 | /* Define Global Variables */ 5 | /*--------------------------------------------------------------------------------*/ 6 | 7 | char JTEST_FW_STR_BUFFER[JTEST_BUF_SIZE] = {0}; 8 | 9 | volatile JTEST_FW_t JTEST_FW = {0}; 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/JTest/src/jtest_trigger_action.c: -------------------------------------------------------------------------------- 1 | 2 | #include "jtest_fw.h" 3 | 4 | void test_start (void) { 5 | // ; 6 | JTEST_FW.test_start++; 7 | } 8 | 9 | void test_end (void) { 10 | // ; 11 | JTEST_FW.test_end++; 12 | } 13 | 14 | void group_start (void) { 15 | // ; 16 | JTEST_FW.group_start++; 17 | } 18 | 19 | void group_end (void) { 20 | // ; 21 | JTEST_FW.group_end++; 22 | } 23 | 24 | void dump_str (void) { 25 | // ; 26 | JTEST_FW.dump_str++; 27 | } 28 | 29 | void dump_data (void) { 30 | // ; 31 | JTEST_FW.dump_data++; 32 | } 33 | 34 | void exit_fw (void) { 35 | // ; 36 | JTEST_FW.exit_fw++; 37 | } 38 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/all_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALL_TESTS_H_ 2 | #define _ALL_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(all_tests); 8 | 9 | #endif /* _ALL_TESTS_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/basic_math_tests/basic_math_test_data.h: -------------------------------------------------------------------------------- 1 | #ifndef ARM_BASIC_MATH_TEST_DATA_H 2 | #define ARM_BASIC_MATH_TEST_DATA_H 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "arr_desc.h" 9 | #include "arm_math.h" 10 | 11 | /*--------------------------------------------------------------------------------*/ 12 | /* Macros and Defines */ 13 | /*--------------------------------------------------------------------------------*/ 14 | #define BASIC_MATH_MAX_INPUT_ELEMENTS 32 15 | #define BASIC_MATH_BIGGEST_INPUT_TYPE float32_t 16 | 17 | /*--------------------------------------------------------------------------------*/ 18 | /* Declare Variables */ 19 | /*--------------------------------------------------------------------------------*/ 20 | 21 | /* Input/Output Buffers */ 22 | ARR_DESC_DECLARE(basic_math_output_fut); 23 | ARR_DESC_DECLARE(basic_math_output_ref); 24 | 25 | extern BASIC_MATH_BIGGEST_INPUT_TYPE 26 | basic_math_output_f32_ref[BASIC_MATH_MAX_INPUT_ELEMENTS]; 27 | 28 | extern BASIC_MATH_BIGGEST_INPUT_TYPE 29 | basic_math_output_f32_fut[BASIC_MATH_MAX_INPUT_ELEMENTS]; 30 | 31 | /* Block Sizes*/ 32 | ARR_DESC_DECLARE(basic_math_block_sizes); 33 | 34 | /* Numbers */ 35 | ARR_DESC_DECLARE(basic_math_elts); 36 | ARR_DESC_DECLARE(basic_math_elts2); 37 | ARR_DESC_DECLARE(basic_math_eltsf); 38 | 39 | /* Float Inputs */ 40 | ARR_DESC_DECLARE(basic_math_zeros); 41 | ARR_DESC_DECLARE(basic_math_f_2); 42 | ARR_DESC_DECLARE(basic_math_f_15); 43 | ARR_DESC_DECLARE(basic_math_f_32); 44 | ARR_DESC_DECLARE(basic_math_f_all); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/basic_math_tests/basic_math_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _BASIC_MATH_TEST_GROUP_H_ 2 | #define _BASIC_MATH_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(basic_math_tests); 8 | 9 | #endif /* _BASIC_MATH_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/basic_math_tests/basic_math_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _BASIC_MATH_TESTS_H_ 2 | #define _BASIC_MATH_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(abs_tests); 8 | JTEST_DECLARE_GROUP(add_tests); 9 | JTEST_DECLARE_GROUP(dot_prod_tests); 10 | JTEST_DECLARE_GROUP(mult_tests); 11 | JTEST_DECLARE_GROUP(negate_tests); 12 | JTEST_DECLARE_GROUP(offset_tests); 13 | JTEST_DECLARE_GROUP(scale_tests); 14 | JTEST_DECLARE_GROUP(shift_tests); 15 | JTEST_DECLARE_GROUP(sub_tests); 16 | 17 | #endif /* _BASIC_MATH_TESTS_H_ */ 18 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/complex_math_tests/complex_math_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPLEX_MATH_TEST_GROUP_H_ 2 | #define _COMPLEX_MATH_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(complex_math_tests); 8 | 9 | #endif /* _COMPLEX_MATH_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/complex_math_tests/complex_math_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPLEX_MATH_TESTS_H_ 2 | #define _COMPLEX_MATH_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(cmplx_conj_tests); 8 | JTEST_DECLARE_GROUP(cmplx_dot_prod_tests); 9 | JTEST_DECLARE_GROUP(cmplx_mag_tests); 10 | JTEST_DECLARE_GROUP(cmplx_mag_squared_tests); 11 | JTEST_DECLARE_GROUP(cmplx_mult_cmplx_tests); 12 | JTEST_DECLARE_GROUP(cmplx_mult_real_tests); 13 | 14 | #endif /* _COMPLEX_MATH_TESTS_H_ */ 15 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/controller_tests/controller_test_data.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONTROLLER_TEST_DATA_H_ 2 | #define _CONTROLLER_TEST_DATA_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "arm_math.h" 9 | 10 | /*--------------------------------------------------------------------------------*/ 11 | /* Macros and Defines */ 12 | /*--------------------------------------------------------------------------------*/ 13 | 14 | #define CONTROLLER_MAX_LEN 1024 15 | #define CONTROLLER_MAX_COEFFS_LEN (12 * 3) 16 | #define TRANFORM_BIGGEST_INPUT_TYPE float32_t 17 | 18 | /*--------------------------------------------------------------------------------*/ 19 | /* Variable Declarations */ 20 | /*--------------------------------------------------------------------------------*/ 21 | 22 | extern float32_t controller_output_fut[CONTROLLER_MAX_LEN]; 23 | extern float32_t controller_output_ref[CONTROLLER_MAX_LEN]; 24 | extern float32_t controller_output_f32_fut[CONTROLLER_MAX_LEN]; 25 | extern float32_t controller_output_f32_ref[CONTROLLER_MAX_LEN]; 26 | extern const float32_t controller_f32_inputs[CONTROLLER_MAX_LEN]; 27 | extern const q31_t controller_q31_inputs[CONTROLLER_MAX_LEN]; 28 | extern const q15_t * controller_q15_inputs; 29 | extern const float32_t controller_f32_coeffs[CONTROLLER_MAX_COEFFS_LEN]; 30 | extern const q31_t controller_q31_coeffs[CONTROLLER_MAX_COEFFS_LEN]; 31 | extern const q15_t controller_q15_coeffs[CONTROLLER_MAX_COEFFS_LEN]; 32 | 33 | #endif /* _CONTROLLER_TEST_DATA_H_ */ 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/controller_tests/controller_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONTROLLER_TEST_GROUP_H_ 2 | #define _CONTROLLER_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Group */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(controller_tests); 8 | 9 | #endif /* _CONTROLLER_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/controller_tests/controller_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONTROLLER_TESTS_H_ 2 | #define _CONTROLLER_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(pid_reset_tests); 8 | JTEST_DECLARE_GROUP(sin_cos_tests); 9 | JTEST_DECLARE_GROUP(pid_tests); 10 | 11 | #endif /* _CONTROLLER_TESTS_H_ */ 12 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/fast_math_tests/fast_math_test_data.h: -------------------------------------------------------------------------------- 1 | #ifndef _FAST_MATH_TEST_DATA_H_ 2 | #define _FAST_MATH_TEST_DATA_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "arm_math.h" 9 | 10 | /*--------------------------------------------------------------------------------*/ 11 | /* Macros and Defines */ 12 | /*--------------------------------------------------------------------------------*/ 13 | 14 | #define FAST_MATH_MAX_LEN 1024 15 | #define TRANFORM_BIGGEST_INPUT_TYPE float32_t 16 | 17 | /*--------------------------------------------------------------------------------*/ 18 | /* Variable Declarations */ 19 | /*--------------------------------------------------------------------------------*/ 20 | 21 | extern float32_t fast_math_output_fut[FAST_MATH_MAX_LEN]; 22 | extern float32_t fast_math_output_ref[FAST_MATH_MAX_LEN]; 23 | extern float32_t fast_math_output_f32_fut[FAST_MATH_MAX_LEN]; 24 | extern float32_t fast_math_output_f32_ref[FAST_MATH_MAX_LEN]; 25 | extern const float32_t fast_math_f32_inputs[FAST_MATH_MAX_LEN]; 26 | extern const q31_t fast_math_q31_inputs[FAST_MATH_MAX_LEN]; 27 | extern const q15_t * fast_math_q15_inputs; 28 | 29 | #endif /* _FAST_MATH_TEST_DATA_H_ */ 30 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/fast_math_tests/fast_math_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _FAST_MATH_TEST_GROUP_H_ 2 | #define _FAST_MATH_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(fast_math_tests); 8 | 9 | #endif /* _FAST_MATH_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/filtering_tests/filtering_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _FILTERING_TEST_GROUP_H_ 2 | #define _FILTERING_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(filtering_tests); 8 | 9 | #endif /* _FILTERING_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/filtering_tests/filtering_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _FILTERING_TESTS_H_ 2 | #define _FILTERING_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | JTEST_DECLARE_GROUP(biquad_tests); 9 | JTEST_DECLARE_GROUP(conv_tests); 10 | JTEST_DECLARE_GROUP(correlate_tests); 11 | JTEST_DECLARE_GROUP(fir_tests); 12 | JTEST_DECLARE_GROUP(iir_tests); 13 | JTEST_DECLARE_GROUP(lms_tests); 14 | 15 | #endif /* _FILTERING_TESTS_H_ */ 16 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/intrinsics_tests/intrinsics_test_data.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTRINSICS_TEST_DATA_H_ 2 | #define _INTRINSICS_TEST_DATA_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "arm_math.h" 9 | 10 | /*--------------------------------------------------------------------------------*/ 11 | /* Macros and Defines */ 12 | /*--------------------------------------------------------------------------------*/ 13 | 14 | #define INTRINSICS_MAX_LEN 1024 15 | 16 | /*--------------------------------------------------------------------------------*/ 17 | /* Variable Declarations */ 18 | /*--------------------------------------------------------------------------------*/ 19 | 20 | extern q63_t intrinsics_output_fut[INTRINSICS_MAX_LEN]; 21 | extern q63_t intrinsics_output_ref[INTRINSICS_MAX_LEN]; 22 | extern float32_t intrinsics_output_f32_fut[INTRINSICS_MAX_LEN]; 23 | extern float32_t intrinsics_output_f32_ref[INTRINSICS_MAX_LEN]; 24 | extern const q63_t intrinsics_q63_inputs[INTRINSICS_MAX_LEN]; 25 | extern const q31_t *intrinsics_q31_inputs; 26 | 27 | #endif /* _INTRINSICS_TEST_DATA_H_ */ 28 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/intrinsics_tests/intrinsics_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTRINSICS_TEST_GROUP_H_ 2 | #define _INTRINSICS_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(intrinsics_tests); 8 | 9 | #endif /* _INTRINSICS_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/matrix_tests/matrix_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _MATRIX_TEST_GROUP_H_ 2 | #define _MATRIX_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(matrix_tests); 8 | 9 | #endif /* _MATRIX_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/matrix_tests/matrix_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _MATRIX_TESTS_H_ 2 | #define _MATRIX_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(mat_add_tests); 8 | JTEST_DECLARE_GROUP(mat_cmplx_mult_tests); 9 | JTEST_DECLARE_GROUP(mat_init_tests); 10 | JTEST_DECLARE_GROUP(mat_inverse_tests); 11 | JTEST_DECLARE_GROUP(mat_mult_tests); 12 | JTEST_DECLARE_GROUP(mat_mult_fast_tests); 13 | JTEST_DECLARE_GROUP(mat_sub_tests); 14 | JTEST_DECLARE_GROUP(mat_trans_tests); 15 | JTEST_DECLARE_GROUP(mat_scale_tests); 16 | 17 | #endif /* _MATRIX_TESTS_H_ */ 18 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/statistics_tests/statistics_test_data.h: -------------------------------------------------------------------------------- 1 | #ifndef _STATISTICS_TEST_DATA_H_ 2 | #define _STATISTICS_TEST_DATA_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "arr_desc.h" 9 | #include "arm_math.h" 10 | 11 | /*--------------------------------------------------------------------------------*/ 12 | /* Macros and Defines */ 13 | /*--------------------------------------------------------------------------------*/ 14 | #define STATISTICS_MAX_INPUT_ELEMENTS 32 15 | #define STATISTICS_BIGGEST_INPUT_TYPE float32_t 16 | 17 | /*--------------------------------------------------------------------------------*/ 18 | /* Declare Variables */ 19 | /*--------------------------------------------------------------------------------*/ 20 | 21 | /* Input/Output Buffers */ 22 | ARR_DESC_DECLARE(statistics_output_fut); 23 | ARR_DESC_DECLARE(statistics_output_ref); 24 | extern uint32_t statistics_idx_fut; 25 | extern uint32_t statistics_idx_ref; 26 | 27 | extern STATISTICS_BIGGEST_INPUT_TYPE 28 | statistics_output_f32_ref[STATISTICS_MAX_INPUT_ELEMENTS]; 29 | 30 | extern STATISTICS_BIGGEST_INPUT_TYPE 31 | statistics_output_f32_fut[STATISTICS_MAX_INPUT_ELEMENTS]; 32 | 33 | 34 | /* Block Sizes */ 35 | ARR_DESC_DECLARE(statistics_block_sizes); 36 | 37 | /* Float Inputs */ 38 | ARR_DESC_DECLARE(statistics_zeros); 39 | ARR_DESC_DECLARE(statistics_f_2); 40 | ARR_DESC_DECLARE(statistics_f_15); 41 | ARR_DESC_DECLARE(statistics_f_32); 42 | ARR_DESC_DECLARE(statistics_f_all); 43 | 44 | #endif /* _STATISTICS_TEST_DATA_H_ */ 45 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/statistics_tests/statistics_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _STATISTICS_TEST_GROUP_H_ 2 | #define _STATISTICS_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(statistics_tests); 8 | 9 | #endif /* _STATISTICS_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/statistics_tests/statistics_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _STATISTICS_TESTS_H_ 2 | #define _STATISTICS_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(max_tests); 8 | JTEST_DECLARE_GROUP(mean_tests); 9 | JTEST_DECLARE_GROUP(min_tests); 10 | JTEST_DECLARE_GROUP(power_tests); 11 | JTEST_DECLARE_GROUP(rms_tests); 12 | JTEST_DECLARE_GROUP(std_tests); 13 | JTEST_DECLARE_GROUP(var_tests); 14 | 15 | #endif /* _STATISTICS_TESTS_H_ */ 16 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/support_tests/support_test_data.h: -------------------------------------------------------------------------------- 1 | #ifndef ARM_SUPPORT_TEST_DATA_H 2 | #define ARM_SUPPORT_TEST_DATA_H 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Includes */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | #include "arr_desc.h" 9 | 10 | /*--------------------------------------------------------------------------------*/ 11 | /* Declare Variables */ 12 | /*--------------------------------------------------------------------------------*/ 13 | 14 | /* Input/Output Buffers */ 15 | ARR_DESC_DECLARE(support_output_fut); 16 | ARR_DESC_DECLARE(support_output_ref); 17 | 18 | /* Block Sizes*/ 19 | ARR_DESC_DECLARE(support_block_sizes); 20 | 21 | /* Numbers */ 22 | ARR_DESC_DECLARE(support_elts); 23 | 24 | /* Float Inputs */ 25 | ARR_DESC_DECLARE(support_zeros); 26 | ARR_DESC_DECLARE(support_f_2); 27 | ARR_DESC_DECLARE(support_f_15); 28 | ARR_DESC_DECLARE(support_f_32); 29 | ARR_DESC_DECLARE(support_f_all); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/support_tests/support_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _SUPPORT_TEST_GROUP_H_ 2 | #define _SUPPORT_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(support_tests); 8 | 9 | #endif /* _SUPPORT_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/support_tests/support_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _SUPPORT_TESTS_H_ 2 | #define _SUPPORT_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(copy_tests); 8 | JTEST_DECLARE_GROUP(fill_tests); 9 | JTEST_DECLARE_GROUP(x_to_y_tests); 10 | 11 | #endif /* _SUPPORT_TESTS_H_ */ 12 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/transform_tests/transform_test_group.h: -------------------------------------------------------------------------------- 1 | #ifndef _TRANSFORM_TEST_GROUP_H_ 2 | #define _TRANSFORM_TEST_GROUP_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Declare Test Groups */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(transform_tests); 8 | 9 | #endif /* _TRANSFORM_TEST_GROUP_H_ */ 10 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/transform_tests/transform_tests.h: -------------------------------------------------------------------------------- 1 | #ifndef _TRANSFORM_TESTS_H_ 2 | #define _TRANSFORM_TESTS_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Test/Group Declarations */ 6 | /*--------------------------------------------------------------------------------*/ 7 | JTEST_DECLARE_GROUP(cfft_tests); 8 | JTEST_DECLARE_GROUP(cfft_family_tests); 9 | JTEST_DECLARE_GROUP(dct4_tests); 10 | JTEST_DECLARE_GROUP(rfft_tests); 11 | JTEST_DECLARE_GROUP(rfft_fast_tests); 12 | 13 | #endif /* _TRANSFORM_TESTS_H_ */ 14 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/inc/type_abbrev.h: -------------------------------------------------------------------------------- 1 | #ifndef _TYPE_ABBREV_H_ 2 | #define _TYPE_ABBREV_H_ 3 | 4 | /*--------------------------------------------------------------------------------*/ 5 | /* Macros and Defines */ 6 | /*--------------------------------------------------------------------------------*/ 7 | 8 | /** 9 | * Expand the abbreviation for a type into the type itself. 10 | */ 11 | #define TYPE_FROM_ABBREV(abbrev) \ 12 | TYPE_ABBREV_##abbrev \ 13 | 14 | /** 15 | * Expand the type to an abbreviation for that type. 16 | * 17 | * Inverse of #TYPE_FROM_ABBREV(). 18 | * 19 | * @note Should be able to get a type back by writing. 20 | * TYPE_FROM_ABBREV(ABBREV_FROM_TYPE(type)) 21 | */ 22 | #define ABBREV_FROM_TYPE(type) \ 23 | TYPE_SUFFIX_##type 24 | 25 | #define TYPE_ABBREV_f64 float64_t 26 | #define TYPE_ABBREV_f32 float32_t 27 | #define TYPE_ABBREV_q31 q31_t 28 | #define TYPE_ABBREV_q15 q15_t 29 | #define TYPE_ABBREV_q7 q7_t 30 | 31 | #define TYPE_SUFFIX_float64_t f64 32 | #define TYPE_SUFFIX_float32_t f32 33 | #define TYPE_SUFFIX_q31_t q31 34 | #define TYPE_SUFFIX_q15_t q15 35 | #define TYPE_SUFFIX_q7_t q7 36 | 37 | #endif /* _TYPE_ABBREV_H_ */ 38 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/platform/ARMCC/Retarget.c: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * Name: Retarget.c 3 | * Purpose: 'Retarget' layer for target-dependent low level functions 4 | * Note(s): 5 | *---------------------------------------------------------------------------- 6 | * This file is part of the uVision/ARM development tools. 7 | * This software may only be used under the terms of a valid, current, 8 | * end user licence from KEIL for a compatible version of KEIL software 9 | * development tools. Nothing else gives you the right to use this software. 10 | * 11 | * This software is supplied "AS IS" without warranties of any kind. 12 | * 13 | * Copyright (c) 2011 Keil - An ARM Company. All rights reserved. 14 | *----------------------------------------------------------------------------*/ 15 | 16 | #include 17 | #include 18 | #include "Serial.h" 19 | 20 | #pragma import(__use_no_semihosting_swi) 21 | 22 | 23 | 24 | struct __FILE { int handle; /* Add whatever you need here */ }; 25 | FILE __stdout; 26 | FILE __stdin; 27 | 28 | 29 | int fputc(int c, FILE *f) { 30 | return (SER_PutChar(c)); 31 | } 32 | 33 | 34 | int fgetc(FILE *f) { 35 | return (SER_GetChar()); 36 | } 37 | 38 | 39 | int ferror(FILE *f) { 40 | /* Your implementation of ferror */ 41 | return EOF; 42 | } 43 | 44 | 45 | void _ttywrch(int c) { 46 | SER_PutChar(c); 47 | } 48 | 49 | 50 | void _sys_exit(int return_code) { 51 | label: goto label; /* endless loop */ 52 | } 53 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/platform/system_generic.c: -------------------------------------------------------------------------------- 1 | 2 | #if (defined (ARMCM0)) 3 | #include "system_ARMCM0.c" 4 | 5 | #elif (defined (ARMCM0P)) 6 | #include "system_ARMCM0plus.c" 7 | 8 | #elif (defined (ARMCM3)) 9 | #include "system_ARMCM3.c" 10 | 11 | #elif (defined (ARMCM4) || defined (ARMCM4_FP)) 12 | #include "system_ARMCM4.c" 13 | 14 | #elif (defined (ARMCM7) || defined (ARMCM7_SP) || defined (ARMCM7_DP)) 15 | #include "system_ARMCM7.c" 16 | 17 | #elif defined (ARMv8MBL) 18 | #include "system_ARMv8MBL.c" 19 | 20 | #elif (defined (ARMv8MML) || defined (ARMv8MML_DSP) || \ 21 | defined (ARMv8MML_SP) || defined (ARMv8MML_DSP_SP) || \ 22 | defined (ARMv8MML_DP) || defined (ARMv8MML_DSP_DP) ) 23 | #include "system_ARMv8MML.c" 24 | 25 | #else 26 | #error "No appropriate system file found!" 27 | #endif 28 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/all_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_group.h" 3 | #include "complex_math_test_group.h" 4 | #include "controller_test_group.h" 5 | #include "fast_math_test_group.h" 6 | #include "filtering_test_group.h" 7 | #include "matrix_test_group.h" 8 | #include "statistics_test_group.h" 9 | #include "support_test_group.h" 10 | #include "transform_test_group.h" 11 | #include "intrinsics_test_group.h" 12 | 13 | JTEST_DEFINE_GROUP(all_tests) 14 | { 15 | /* 16 | To skip a test, comment it out 17 | */ 18 | JTEST_GROUP_CALL(basic_math_tests); 19 | JTEST_GROUP_CALL(complex_math_tests); 20 | JTEST_GROUP_CALL(controller_tests); 21 | JTEST_GROUP_CALL(fast_math_tests); 22 | JTEST_GROUP_CALL(filtering_tests); 23 | JTEST_GROUP_CALL(matrix_tests); 24 | JTEST_GROUP_CALL(statistics_tests); 25 | JTEST_GROUP_CALL(support_tests); 26 | JTEST_GROUP_CALL(transform_tests); 27 | JTEST_GROUP_CALL(intrinsics_tests); 28 | 29 | return; 30 | } 31 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/abs_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_ABS_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | abs, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix)) 16 | 17 | JTEST_ARM_ABS_TEST(f32); 18 | JTEST_ARM_ABS_TEST(q31); 19 | JTEST_ARM_ABS_TEST(q15); 20 | JTEST_ARM_ABS_TEST(q7 ); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(abs_tests) 27 | { 28 | JTEST_TEST_CALL(arm_abs_f32_test); 29 | JTEST_TEST_CALL(arm_abs_q31_test); 30 | JTEST_TEST_CALL(arm_abs_q15_test); 31 | JTEST_TEST_CALL(arm_abs_q7_test); 32 | } 33 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/add_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_ADD_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | add, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | BASIC_MATH_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_ADD_TEST(f32); 19 | JTEST_ARM_ADD_TEST(q31); 20 | JTEST_ARM_ADD_TEST(q15); 21 | JTEST_ARM_ADD_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(add_tests) 28 | { 29 | JTEST_TEST_CALL(arm_add_f32_test); 30 | JTEST_TEST_CALL(arm_add_q31_test); 31 | JTEST_TEST_CALL(arm_add_q15_test); 32 | JTEST_TEST_CALL(arm_add_q7_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/basic_math_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(basic_math_tests) 5 | { 6 | JTEST_GROUP_CALL(abs_tests); 7 | JTEST_GROUP_CALL(add_tests); 8 | JTEST_GROUP_CALL(dot_prod_tests); 9 | JTEST_GROUP_CALL(mult_tests); 10 | JTEST_GROUP_CALL(negate_tests); 11 | JTEST_GROUP_CALL(offset_tests); 12 | JTEST_GROUP_CALL(scale_tests); 13 | JTEST_GROUP_CALL(shift_tests); 14 | JTEST_GROUP_CALL(sub_tests); 15 | 16 | return; 17 | } 18 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/dot_prod_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_DOT_PROD_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | dot_prod, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | BASIC_MATH_SNR_ELT1_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_DOT_PROD_TEST(f32); 19 | JTEST_ARM_DOT_PROD_TEST(q31); 20 | JTEST_ARM_DOT_PROD_TEST(q15); 21 | JTEST_ARM_DOT_PROD_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(dot_prod_tests) 28 | { 29 | JTEST_TEST_CALL(arm_dot_prod_f32_test); 30 | JTEST_TEST_CALL(arm_dot_prod_q31_test); 31 | JTEST_TEST_CALL(arm_dot_prod_q15_test); 32 | JTEST_TEST_CALL(arm_dot_prod_q7_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/mult_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MULT_TEST(suffix, compare_interface) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | mult, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | compare_interface) 17 | 18 | JTEST_ARM_MULT_TEST(f32, BASIC_MATH_COMPARE_INTERFACE); 19 | JTEST_ARM_MULT_TEST(q31, BASIC_MATH_SNR_COMPARE_INTERFACE); 20 | JTEST_ARM_MULT_TEST(q15, BASIC_MATH_COMPARE_INTERFACE); 21 | JTEST_ARM_MULT_TEST(q7 , BASIC_MATH_COMPARE_INTERFACE); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(mult_tests) 28 | { 29 | JTEST_TEST_CALL(arm_mult_f32_test); 30 | JTEST_TEST_CALL(arm_mult_q31_test); 31 | JTEST_TEST_CALL(arm_mult_q15_test); 32 | JTEST_TEST_CALL(arm_mult_q7_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/negate_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_NEGATE_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | negate, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix)) 16 | 17 | JTEST_ARM_NEGATE_TEST(f32); 18 | JTEST_ARM_NEGATE_TEST(q31); 19 | JTEST_ARM_NEGATE_TEST(q15); 20 | JTEST_ARM_NEGATE_TEST(q7); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(negate_tests) 27 | { 28 | JTEST_TEST_CALL(arm_negate_f32_test); 29 | JTEST_TEST_CALL(arm_negate_q31_test); 30 | JTEST_TEST_CALL(arm_negate_q15_test); 31 | JTEST_TEST_CALL(arm_negate_q7_test); 32 | } 33 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/offset_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_OFFSET_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF1_ELT1_BLK( \ 12 | offset, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | TYPE_FROM_ABBREV(suffix)) 17 | 18 | JTEST_ARM_OFFSET_TEST(f32); 19 | JTEST_ARM_OFFSET_TEST(q31); 20 | JTEST_ARM_OFFSET_TEST(q15); 21 | JTEST_ARM_OFFSET_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(offset_tests) 28 | { 29 | JTEST_TEST_CALL(arm_offset_f32_test); 30 | JTEST_TEST_CALL(arm_offset_q31_test); 31 | JTEST_TEST_CALL(arm_offset_q15_test); 32 | JTEST_TEST_CALL(arm_offset_q7_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/shift_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_SHIFT_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF1_ELT1_BLK( \ 12 | shift, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | int8_t, /*elt_type*/ \ 16 | TYPE_FROM_ABBREV(suffix)) 17 | 18 | JTEST_ARM_SHIFT_TEST(q31); 19 | JTEST_ARM_SHIFT_TEST(q15); 20 | JTEST_ARM_SHIFT_TEST(q7); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(shift_tests) 27 | { 28 | JTEST_TEST_CALL(arm_shift_q31_test); 29 | JTEST_TEST_CALL(arm_shift_q15_test); 30 | JTEST_TEST_CALL(arm_shift_q7_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/basic_math_tests/sub_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "basic_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "basic_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_SUB_TEST(suffix) \ 11 | BASIC_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | sub, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | BASIC_MATH_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_SUB_TEST(f32); 19 | JTEST_ARM_SUB_TEST(q31); 20 | JTEST_ARM_SUB_TEST(q15); 21 | JTEST_ARM_SUB_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(sub_tests) 28 | { 29 | JTEST_TEST_CALL(arm_sub_f32_test); 30 | JTEST_TEST_CALL(arm_sub_q31_test); 31 | JTEST_TEST_CALL(arm_sub_q15_test); 32 | JTEST_TEST_CALL(arm_sub_q7_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/cmplx_conj_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "complex_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_CMPLX_CONJ_TEST(suffix) \ 11 | COMPLEX_MATH_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | cmplx_conj, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | COMPLEX_MATH_SNR_COMPARE_CMPLX_INTERFACE) 17 | 18 | JTEST_ARM_CMPLX_CONJ_TEST(f32); 19 | JTEST_ARM_CMPLX_CONJ_TEST(q31); 20 | JTEST_ARM_CMPLX_CONJ_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(cmplx_conj_tests) 27 | { 28 | JTEST_TEST_CALL(arm_cmplx_conj_f32_test); 29 | JTEST_TEST_CALL(arm_cmplx_conj_q31_test); 30 | JTEST_TEST_CALL(arm_cmplx_conj_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/cmplx_dot_prod_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "complex_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_CMPLX_DOT_PROD_TEST(suffix, comparison_interface) \ 11 | COMPLEX_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | cmplx_dot_prod, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | comparison_interface) 17 | 18 | JTEST_ARM_CMPLX_DOT_PROD_TEST(f32, COMPLEX_MATH_SNR_COMPARE_SPLIT_INTERFACE); 19 | JTEST_ARM_CMPLX_DOT_PROD_TEST(q31, COMPLEX_MATH_SNR_COMPARE_SPLIT_INTERFACE); 20 | JTEST_ARM_CMPLX_DOT_PROD_TEST(q15, COMPLEX_MATH_SNR_COMPARE_SPLIT_INTERFACE); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(cmplx_dot_prod_tests) 27 | { 28 | JTEST_TEST_CALL(arm_cmplx_dot_prod_f32_test); 29 | JTEST_TEST_CALL(arm_cmplx_dot_prod_q31_test); 30 | JTEST_TEST_CALL(arm_cmplx_dot_prod_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/cmplx_mag_squared_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "complex_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_CMPLX_MAG_SQUARED_TEST(suffix) \ 11 | COMPLEX_MATH_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | cmplx_mag_squared, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | COMPLEX_MATH_COMPARE_RE_INTERFACE) 17 | 18 | JTEST_ARM_CMPLX_MAG_SQUARED_TEST(f32); 19 | JTEST_ARM_CMPLX_MAG_SQUARED_TEST(q31); 20 | JTEST_ARM_CMPLX_MAG_SQUARED_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(cmplx_mag_squared_tests) 27 | { 28 | JTEST_TEST_CALL(arm_cmplx_mag_squared_f32_test); 29 | JTEST_TEST_CALL(arm_cmplx_mag_squared_q31_test); 30 | JTEST_TEST_CALL(arm_cmplx_mag_squared_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/cmplx_mag_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "complex_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_CMPLX_MAG_TEST(suffix, comparison_interface) \ 11 | COMPLEX_MATH_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | cmplx_mag, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | comparison_interface) 17 | 18 | JTEST_ARM_CMPLX_MAG_TEST(f32, COMPLEX_MATH_COMPARE_RE_INTERFACE); 19 | JTEST_ARM_CMPLX_MAG_TEST(q31, COMPLEX_MATH_SNR_COMPARE_RE_INTERFACE); 20 | JTEST_ARM_CMPLX_MAG_TEST(q15, COMPLEX_MATH_SNR_COMPARE_RE_INTERFACE); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(cmplx_mag_tests) 27 | { 28 | JTEST_TEST_CALL(arm_cmplx_mag_f32_test); 29 | JTEST_TEST_CALL(arm_cmplx_mag_q31_test); 30 | JTEST_TEST_CALL(arm_cmplx_mag_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/cmplx_mult_cmplx_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "complex_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_CMPLX_MULT_CMPLX_TEST(suffix) \ 11 | COMPLEX_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | cmplx_mult_cmplx, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | COMPLEX_MATH_COMPARE_CMPLX_INTERFACE) 17 | 18 | JTEST_ARM_CMPLX_MULT_CMPLX_TEST(f32); 19 | JTEST_ARM_CMPLX_MULT_CMPLX_TEST(q31); 20 | JTEST_ARM_CMPLX_MULT_CMPLX_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(cmplx_mult_cmplx_tests) 27 | { 28 | JTEST_TEST_CALL(arm_cmplx_mult_cmplx_f32_test); 29 | JTEST_TEST_CALL(arm_cmplx_mult_cmplx_q31_test); 30 | JTEST_TEST_CALL(arm_cmplx_mult_cmplx_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/cmplx_mult_real_test.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "complex_math_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_CMPLX_MULT_REAL_TEST(suffix, comparison_interface) \ 11 | COMPLEX_MATH_DEFINE_TEST_TEMPLATE_BUF2_BLK( \ 12 | cmplx_mult_real, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | comparison_interface) 17 | 18 | JTEST_ARM_CMPLX_MULT_REAL_TEST(f32, COMPLEX_MATH_COMPARE_CMPLX_INTERFACE); 19 | JTEST_ARM_CMPLX_MULT_REAL_TEST(q31, COMPLEX_MATH_SNR_COMPARE_CMPLX_INTERFACE); 20 | JTEST_ARM_CMPLX_MULT_REAL_TEST(q15, COMPLEX_MATH_COMPARE_CMPLX_INTERFACE); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(cmplx_mult_real_tests) 27 | { 28 | JTEST_TEST_CALL(arm_cmplx_mult_real_f32_test); 29 | JTEST_TEST_CALL(arm_cmplx_mult_real_q31_test); 30 | JTEST_TEST_CALL(arm_cmplx_mult_real_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/complex_math_tests/complex_math_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "complex_math_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(complex_math_tests) 5 | { 6 | JTEST_GROUP_CALL(cmplx_conj_tests); 7 | JTEST_GROUP_CALL(cmplx_dot_prod_tests); 8 | JTEST_GROUP_CALL(cmplx_mag_tests); 9 | JTEST_GROUP_CALL(cmplx_mag_squared_tests); 10 | JTEST_GROUP_CALL(cmplx_mult_cmplx_tests); 11 | JTEST_GROUP_CALL(cmplx_mult_real_tests); 12 | 13 | return; 14 | } 15 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/controller_tests/controller_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "controller_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(controller_tests) 5 | { 6 | /* 7 | To skip a test, comment it out. 8 | */ 9 | JTEST_GROUP_CALL(pid_reset_tests); 10 | JTEST_GROUP_CALL(pid_tests); 11 | JTEST_GROUP_CALL(sin_cos_tests); 12 | return; 13 | } 14 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/fast_math_tests/fast_math_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "ref.h" 3 | #include "arr_desc.h" 4 | #include "fast_math_templates.h" 5 | #include "fast_math_test_data.h" 6 | #include "type_abbrev.h" 7 | 8 | SQRT_TEST_TEMPLATE_ELT1(q31); 9 | SQRT_TEST_TEMPLATE_ELT1(q15); 10 | 11 | SIN_COS_TEST_TEMPLATE_ELT1(f32, float32_t, sin); 12 | SIN_COS_TEST_TEMPLATE_ELT1(q31, q31_t, sin); 13 | SIN_COS_TEST_TEMPLATE_ELT1(q15, q15_t, sin); 14 | 15 | SIN_COS_TEST_TEMPLATE_ELT1(f32, float32_t, cos); 16 | SIN_COS_TEST_TEMPLATE_ELT1(q31, q31_t, cos); 17 | SIN_COS_TEST_TEMPLATE_ELT1(q15, q15_t, cos); 18 | 19 | /*--------------------------------------------------------------------------------*/ 20 | /* Collect all tests in a group */ 21 | /*--------------------------------------------------------------------------------*/ 22 | 23 | JTEST_DEFINE_GROUP(fast_math_tests) 24 | { 25 | /* 26 | To skip a test, comment it out. 27 | */ 28 | JTEST_TEST_CALL(arm_sqrt_q31_test); 29 | JTEST_TEST_CALL(arm_sqrt_q15_test); 30 | 31 | JTEST_TEST_CALL(arm_sin_f32_test); 32 | JTEST_TEST_CALL(arm_sin_q31_test); 33 | JTEST_TEST_CALL(arm_sin_q15_test); 34 | 35 | JTEST_TEST_CALL(arm_cos_f32_test); 36 | JTEST_TEST_CALL(arm_cos_q31_test); 37 | JTEST_TEST_CALL(arm_cos_q15_test); 38 | } 39 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/filtering_tests/filtering_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "filtering_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(filtering_tests) 5 | { 6 | /* 7 | To skip a test, comment it out. 8 | */ 9 | JTEST_GROUP_CALL(biquad_tests); 10 | JTEST_GROUP_CALL(conv_tests); 11 | JTEST_GROUP_CALL(correlate_tests); 12 | JTEST_GROUP_CALL(fir_tests); 13 | JTEST_GROUP_CALL(iir_tests); 14 | JTEST_GROUP_CALL(lms_tests); 15 | 16 | return; 17 | } 18 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "all_tests.h" 3 | #include "arm_math.h" 4 | 5 | 6 | #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 7 | asm(" .global __ARM_use_no_argv\n"); 8 | #endif 9 | 10 | 11 | void debug_init(void) 12 | { 13 | uint32_t * SHCSR_ptr = (uint32_t *) 0xE000ED24; /* System Handler Control and State Register */ 14 | *SHCSR_ptr |= 0x70000; /* Enable UsageFault, BusFault, and MemManage fault*/ 15 | } 16 | 17 | int main(void) 18 | { 19 | debug_init(); 20 | 21 | JTEST_INIT(); /* Initialize test framework. */ 22 | 23 | JTEST_GROUP_CALL(all_tests); /* Run all tests. */ 24 | 25 | JTEST_ACT_EXIT_FW(); /* Exit test framework. */ 26 | while (1); /* Never return. */ 27 | } 28 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/matrix_tests/mat_add_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "matrix_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "matrix_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MAT_ADD_TEST(suffix) \ 11 | MATRIX_DEFINE_TEST_TEMPLATE_ELT2( \ 12 | mat_add, \ 13 | suffix, \ 14 | MATRIX_TEST_CONFIG_ADDITIVE_OUTPUT, \ 15 | MATRIX_TEST_VALID_ADDITIVE_DIMENSIONS, \ 16 | MATRIX_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_MAT_ADD_TEST(f32); 19 | JTEST_ARM_MAT_ADD_TEST(q31); 20 | JTEST_ARM_MAT_ADD_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(mat_add_tests) 27 | { 28 | JTEST_TEST_CALL(arm_mat_add_f32_test); 29 | JTEST_TEST_CALL(arm_mat_add_q31_test); 30 | JTEST_TEST_CALL(arm_mat_add_q15_test); 31 | } 32 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/matrix_tests/mat_sub_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "matrix_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "matrix_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MAT_SUB_TEST(suffix) \ 11 | MATRIX_DEFINE_TEST_TEMPLATE_ELT2( \ 12 | mat_sub, \ 13 | suffix, \ 14 | MATRIX_TEST_CONFIG_ADDITIVE_OUTPUT, \ 15 | MATRIX_TEST_VALID_ADDITIVE_DIMENSIONS, \ 16 | MATRIX_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_MAT_SUB_TEST(f32); 19 | JTEST_ARM_MAT_SUB_TEST(q31); 20 | JTEST_ARM_MAT_SUB_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(mat_sub_tests) 27 | { 28 | /* 29 | To skip a test, comment it out. 30 | */ 31 | JTEST_TEST_CALL(arm_mat_sub_f32_test); 32 | JTEST_TEST_CALL(arm_mat_sub_q31_test); 33 | JTEST_TEST_CALL(arm_mat_sub_q15_test); 34 | } 35 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/matrix_tests/mat_trans_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "matrix_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "matrix_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MAT_TRANS_TEST(suffix) \ 11 | MATRIX_DEFINE_TEST_TEMPLATE_ELT1( \ 12 | mat_trans, \ 13 | suffix, \ 14 | MATRIX_TEST_CONFIG_TRANSPOSE_OUTPUT, \ 15 | MATRIX_TEST_VALID_DIMENSIONS_ALWAYS) 16 | 17 | JTEST_ARM_MAT_TRANS_TEST(f32); 18 | JTEST_ARM_MAT_TRANS_TEST(q31); 19 | JTEST_ARM_MAT_TRANS_TEST(q15); 20 | 21 | /*--------------------------------------------------------------------------------*/ 22 | /* Collect all tests in a group. */ 23 | /*--------------------------------------------------------------------------------*/ 24 | 25 | JTEST_DEFINE_GROUP(mat_trans_tests) 26 | { 27 | /* 28 | To skip a test, comment it out. 29 | */ 30 | JTEST_TEST_CALL(arm_mat_trans_f32_test); 31 | JTEST_TEST_CALL(arm_mat_trans_q31_test); 32 | JTEST_TEST_CALL(arm_mat_trans_q15_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/matrix_tests/matrix_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "matrix_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(matrix_tests) 5 | { 6 | /* 7 | To skip a test, comment it out. 8 | */ 9 | JTEST_GROUP_CALL(mat_add_tests); 10 | JTEST_GROUP_CALL(mat_cmplx_mult_tests); 11 | JTEST_GROUP_CALL(mat_init_tests); 12 | JTEST_GROUP_CALL(mat_inverse_tests); 13 | JTEST_GROUP_CALL(mat_mult_tests); 14 | JTEST_GROUP_CALL(mat_mult_fast_tests); 15 | JTEST_GROUP_CALL(mat_sub_tests); 16 | JTEST_GROUP_CALL(mat_trans_tests); 17 | JTEST_GROUP_CALL(mat_scale_tests); 18 | return; 19 | } 20 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/max_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MAX_TEST(suffix) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | max, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_MAX_TEST(f32); 19 | JTEST_ARM_MAX_TEST(q31); 20 | JTEST_ARM_MAX_TEST(q15); 21 | JTEST_ARM_MAX_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(max_tests) 28 | { 29 | /* 30 | To skip a test, comment it out. 31 | */ 32 | JTEST_TEST_CALL(arm_max_f32_test); 33 | JTEST_TEST_CALL(arm_max_q31_test); 34 | JTEST_TEST_CALL(arm_max_q15_test); 35 | JTEST_TEST_CALL(arm_max_q7_test); 36 | } 37 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/mean_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MEAN_TEST(suffix) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | mean, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_MEAN_TEST(f32); 19 | JTEST_ARM_MEAN_TEST(q31); 20 | JTEST_ARM_MEAN_TEST(q15); 21 | JTEST_ARM_MEAN_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(mean_tests) 28 | { 29 | /* 30 | To skip a test, comment it out. 31 | */ 32 | JTEST_TEST_CALL(arm_mean_f32_test); 33 | JTEST_TEST_CALL(arm_mean_q31_test); 34 | JTEST_TEST_CALL(arm_mean_q15_test); 35 | JTEST_TEST_CALL(arm_mean_q7_test); 36 | } 37 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/min_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_MIN_TEST(suffix) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | min, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_MIN_TEST(f32); 19 | JTEST_ARM_MIN_TEST(q31); 20 | JTEST_ARM_MIN_TEST(q15); 21 | JTEST_ARM_MIN_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(min_tests) 28 | { 29 | /* 30 | To skip a test, comment it out. 31 | */ 32 | JTEST_TEST_CALL(arm_min_f32_test); 33 | JTEST_TEST_CALL(arm_min_q31_test); 34 | JTEST_TEST_CALL(arm_min_q15_test); 35 | JTEST_TEST_CALL(arm_min_q7_test); 36 | } 37 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/power_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_POWER_TEST(suffix, output_type) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | power, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_SNR_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_POWER_TEST(f32, float32_t); 19 | JTEST_ARM_POWER_TEST(q31, q63_t); 20 | JTEST_ARM_POWER_TEST(q15, q63_t); 21 | JTEST_ARM_POWER_TEST(q7, q31_t); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(power_tests) 28 | { 29 | /* 30 | To skip a test, comment it out. 31 | */ 32 | JTEST_TEST_CALL(arm_power_f32_test); 33 | JTEST_TEST_CALL(arm_power_q31_test); 34 | JTEST_TEST_CALL(arm_power_q15_test); 35 | JTEST_TEST_CALL(arm_power_q7_test); 36 | } 37 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_RMS_TEST(suffix) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | rms, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_SNR_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_RMS_TEST(f32); 19 | JTEST_ARM_RMS_TEST(q31); 20 | JTEST_ARM_RMS_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(rms_tests) 27 | { 28 | /* 29 | To skip a test, comment it out. 30 | */ 31 | JTEST_TEST_CALL(arm_rms_f32_test); 32 | JTEST_TEST_CALL(arm_rms_q31_test); 33 | JTEST_TEST_CALL(arm_rms_q15_test); 34 | } 35 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/statistics_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(statistics_tests) 5 | { 6 | JTEST_GROUP_CALL(max_tests); 7 | JTEST_GROUP_CALL(mean_tests); 8 | JTEST_GROUP_CALL(min_tests); 9 | JTEST_GROUP_CALL(power_tests); 10 | JTEST_GROUP_CALL(rms_tests); 11 | JTEST_GROUP_CALL(std_tests); 12 | JTEST_GROUP_CALL(var_tests); 13 | return; 14 | } 15 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/std_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_STD_TEST(suffix) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | std, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_SNR_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_STD_TEST(f32); 19 | JTEST_ARM_STD_TEST(q31); 20 | JTEST_ARM_STD_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(std_tests) 27 | { 28 | /* 29 | To skip a test, comment it out. 30 | */ 31 | JTEST_TEST_CALL(arm_std_f32_test); 32 | JTEST_TEST_CALL(arm_std_q31_test); 33 | JTEST_TEST_CALL(arm_std_q15_test); 34 | } 35 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/var_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "statistics_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "statistics_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_VAR_TEST(suffix) \ 11 | STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | var, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | STATISTICS_SNR_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_VAR_TEST(f32); 19 | JTEST_ARM_VAR_TEST(q31); 20 | JTEST_ARM_VAR_TEST(q15); 21 | 22 | /*--------------------------------------------------------------------------------*/ 23 | /* Collect all tests in a group. */ 24 | /*--------------------------------------------------------------------------------*/ 25 | 26 | JTEST_DEFINE_GROUP(var_tests) 27 | { 28 | /* 29 | To skip a test, comment it out. 30 | */ 31 | JTEST_TEST_CALL(arm_var_f32_test); 32 | JTEST_TEST_CALL(arm_var_q31_test); 33 | JTEST_TEST_CALL(arm_var_q15_test); 34 | } 35 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/copy_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "support_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "support_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_COPY_TEST(suffix) \ 11 | SUPPORT_DEFINE_TEST_TEMPLATE_BUF1_BLK( \ 12 | copy, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | SUPPORT_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_COPY_TEST(f32); 19 | JTEST_ARM_COPY_TEST(q31); 20 | JTEST_ARM_COPY_TEST(q15); 21 | JTEST_ARM_COPY_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(copy_tests) 28 | { 29 | JTEST_TEST_CALL(arm_copy_f32_test); 30 | JTEST_TEST_CALL(arm_copy_q31_test); 31 | JTEST_TEST_CALL(arm_copy_q15_test); 32 | JTEST_TEST_CALL(arm_copy_q7_test); 33 | } 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/fill_tests.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "support_test_data.h" 3 | #include "arr_desc.h" 4 | #include "arm_math.h" /* FUTs */ 5 | #include "ref.h" /* Reference Functions */ 6 | #include "test_templates.h" 7 | #include "support_templates.h" 8 | #include "type_abbrev.h" 9 | 10 | #define JTEST_ARM_FILL_TEST(suffix) \ 11 | SUPPORT_DEFINE_TEST_TEMPLATE_ELT1_BLK( \ 12 | fill, \ 13 | suffix, \ 14 | TYPE_FROM_ABBREV(suffix), \ 15 | TYPE_FROM_ABBREV(suffix), \ 16 | SUPPORT_COMPARE_INTERFACE) 17 | 18 | JTEST_ARM_FILL_TEST(f32); 19 | JTEST_ARM_FILL_TEST(q31); 20 | JTEST_ARM_FILL_TEST(q15); 21 | JTEST_ARM_FILL_TEST(q7); 22 | 23 | /*--------------------------------------------------------------------------------*/ 24 | /* Collect all tests in a group. */ 25 | /*--------------------------------------------------------------------------------*/ 26 | 27 | JTEST_DEFINE_GROUP(fill_tests) 28 | { 29 | /* 30 | To skip a test, comment it out. 31 | */ 32 | JTEST_TEST_CALL(arm_fill_f32_test); 33 | JTEST_TEST_CALL(arm_fill_q31_test); 34 | JTEST_TEST_CALL(arm_fill_q15_test); 35 | JTEST_TEST_CALL(arm_fill_q7_test); 36 | } 37 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/support_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "support_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(support_tests) 5 | { 6 | JTEST_GROUP_CALL(copy_tests); 7 | JTEST_GROUP_CALL(fill_tests); 8 | JTEST_GROUP_CALL(x_to_y_tests); 9 | return; 10 | } 11 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/transform_tests/transform_test_group.c: -------------------------------------------------------------------------------- 1 | #include "jtest.h" 2 | #include "transform_tests.h" 3 | 4 | JTEST_DEFINE_GROUP(transform_tests) 5 | { 6 | JTEST_GROUP_CALL(cfft_tests); 7 | JTEST_GROUP_CALL(cfft_family_tests); 8 | JTEST_GROUP_CALL(rfft_tests); 9 | JTEST_GROUP_CALL(rfft_fast_tests); 10 | JTEST_GROUP_CALL(dct4_tests); 11 | } 12 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/BasicMathFunctions/abs.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_abs_f32( 4 | float32_t * pSrc, 5 | float32_t * pDst, 6 | uint32_t blockSize) 7 | { 8 | uint32_t i; 9 | 10 | for(i=0;i> 14; //16.48 31 | } 32 | *result = sum; 33 | } 34 | 35 | void ref_dot_prod_q15( 36 | q15_t * pSrcA, 37 | q15_t * pSrcB, 38 | uint32_t blockSize, 39 | q63_t * result) 40 | { 41 | uint32_t i; 42 | q63_t sum = 0.0f; 43 | 44 | for(i=0;i> 32; 29 | temp = temp << 1; 30 | pDst[i] = ref_sat_q31(temp); 31 | } 32 | } 33 | 34 | void ref_mult_q15( 35 | q15_t * pSrcA, 36 | q15_t * pSrcB, 37 | q15_t * pDst, 38 | uint32_t blockSize) 39 | { 40 | uint32_t i; 41 | q31_t temp; 42 | 43 | for(i=0;i> 15; //this comment is for JD, this is specifically 15 and not 16 like the q31 case might imply. This is because CMSIS DSP lib does it this way. No other reason. 46 | pDst[i] = ref_sat_q15(temp); 47 | } 48 | } 49 | 50 | void ref_mult_q7( 51 | q7_t * pSrcA, 52 | q7_t * pSrcB, 53 | q7_t * pDst, 54 | uint32_t blockSize) 55 | { 56 | uint32_t i; 57 | q15_t temp; 58 | 59 | for(i=0;i> 7; 62 | pDst[i] = ref_sat_q7(temp); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/BasicMathFunctions/negate.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_negate_f32( 4 | float32_t * pSrc, 5 | float32_t * pDst, 6 | uint32_t blockSize) 7 | { 8 | uint32_t i; 9 | 10 | for(i=0;i> 32; 32 | if (sign) 33 | pDst[i] = temp >> -kShift; 34 | else 35 | pDst[i] = ref_sat_q31( (q63_t)temp << kShift ); 36 | } 37 | } 38 | 39 | void ref_scale_q15( 40 | q15_t * pSrc, 41 | q15_t scaleFract, 42 | int8_t shift, 43 | q15_t * pDst, 44 | uint32_t blockSize) 45 | { 46 | uint32_t i; 47 | int8_t kShift = 15 - shift; /* Shift to apply after scaling */ 48 | 49 | for(i=0;i> kShift); 52 | } 53 | } 54 | 55 | void ref_scale_q7( 56 | q7_t * pSrc, 57 | q7_t scaleFract, 58 | int8_t shift, 59 | q7_t * pDst, 60 | uint32_t blockSize) 61 | { 62 | uint32_t i; 63 | int8_t kShift = 7 - shift; /* Shift to apply after scaling */ 64 | 65 | for(i=0;i> kShift); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/BasicMathFunctions/shift.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_shift_q31( 4 | q31_t * pSrc, 5 | int8_t shiftBits, 6 | q31_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t i; 10 | 11 | if (shiftBits < 0) 12 | { 13 | for(i=0;i> -shiftBits; 23 | } 24 | } 25 | } 26 | 27 | void ref_shift_q15( 28 | q15_t * pSrc, 29 | int8_t shiftBits, 30 | q15_t * pDst, 31 | uint32_t blockSize) 32 | { 33 | uint32_t i; 34 | 35 | if (shiftBits < 0) 36 | { 37 | for(i=0;i> -shiftBits; 47 | } 48 | } 49 | } 50 | 51 | void ref_shift_q7( 52 | q7_t * pSrc, 53 | int8_t shiftBits, 54 | q7_t * pDst, 55 | uint32_t blockSize) 56 | { 57 | uint32_t i; 58 | 59 | if (shiftBits < 0) 60 | { 61 | for(i=0;i> -shiftBits; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/BasicMathFunctions/sub.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_sub_f32( 4 | float32_t * pSrcA, 5 | float32_t * pSrcB, 6 | float32_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t i; 10 | 11 | for(i=0;i> 14) - (((q63_t)pSrcA[i+1] * pSrcB[i+1]) >> 14); 43 | sumi += (((q63_t)pSrcA[i] * pSrcB[i+1]) >> 14) + (((q63_t)pSrcA[i+1] * pSrcB[i] ) >> 14); 44 | } 45 | 46 | *realResult = sumr; 47 | *imagResult = sumi; 48 | } 49 | 50 | void ref_cmplx_dot_prod_q15( 51 | q15_t * pSrcA, 52 | q15_t * pSrcB, 53 | uint32_t numSamples, 54 | q31_t * realResult, 55 | q31_t * imagResult) 56 | { 57 | q63_t sumr, sumi; 58 | uint32_t i; 59 | 60 | sumr = 0; 61 | sumi = 0; 62 | 63 | for(i=0;i> 6); 71 | *imagResult = (q31_t)(sumi >> 6); 72 | } 73 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_cmplx_mag_f32( 4 | float32_t * pSrc, 5 | float32_t * pDst, 6 | uint32_t numSamples) 7 | { 8 | uint32_t i; 9 | 10 | for(i=0;i> 33); 27 | acc1 = (q31_t)(((q63_t)pSrc[i+1] * pSrc[i+1]) >> 33); 28 | out = acc0 + acc1; 29 | *pDst++ = (q31_t)(sqrtf((float)out / 2147483648.0f) * 2147483648.0f); 30 | } 31 | } 32 | 33 | void ref_cmplx_mag_q15( 34 | q15_t * pSrc, 35 | q15_t * pDst, 36 | uint32_t numSamples) 37 | { 38 | uint32_t i; 39 | q31_t acc0,acc1; 40 | q15_t out; 41 | 42 | for(i=0;i> 17); 47 | *pDst++ = (q15_t)(sqrtf((float)out / 32768.0f) * 32768.0f); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag_squared.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_cmplx_mag_squared_f32( 4 | float32_t * pSrc, 5 | float32_t * pDst, 6 | uint32_t numSamples) 7 | { 8 | uint32_t i; 9 | 10 | for(i=0;i> 33); 27 | acc1 = (q31_t)(((q63_t)pSrc[i+1] * pSrc[i+1]) >> 33); 28 | *pDst++ = acc0 + acc1; 29 | } 30 | } 31 | 32 | void ref_cmplx_mag_squared_q15( 33 | q15_t * pSrc, 34 | q15_t * pDst, 35 | uint32_t numSamples) 36 | { 37 | uint32_t i; 38 | q31_t acc0,acc1; 39 | 40 | for(i=0;i> 17); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_cmplx.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_cmplx_mult_cmplx_f32( 4 | float32_t * pSrcA, 5 | float32_t * pSrcB, 6 | float32_t * pDst, 7 | uint32_t numSamples) 8 | { 9 | uint32_t i; 10 | 11 | for(i=0;i> 33; 30 | mul2 = ((q63_t)pSrcA[i+1] * pSrcB[i+1]) >> 33; 31 | mul3 = ((q63_t)pSrcA[i] * pSrcB[i+1]) >> 33; 32 | mul4 = ((q63_t)pSrcA[i+1] * pSrcB[i]) >> 33; 33 | pDst[i] = mul1 - mul2; 34 | pDst[i+1] = mul3 + mul4; 35 | } 36 | } 37 | 38 | void ref_cmplx_mult_cmplx_q15( 39 | q15_t * pSrcA, 40 | q15_t * pSrcB, 41 | q15_t * pDst, 42 | uint32_t numSamples) 43 | { 44 | uint32_t i; 45 | q31_t mul1, mul2, mul3, mul4; 46 | 47 | for(i=0;i> 17; 50 | mul2 = ((q31_t)pSrcA[i+1] * pSrcB[i+1]) >> 17; 51 | mul3 = ((q31_t)pSrcA[i] * pSrcB[i+1]) >> 17; 52 | mul4 = ((q31_t)pSrcA[i+1] * pSrcB[i]) >> 17; 53 | pDst[i] = mul1 - mul2; 54 | pDst[i+1] = mul3 + mul4; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_real.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_cmplx_mult_real_f32( 4 | float32_t * pSrcCmplx, 5 | float32_t * pSrcReal, 6 | float32_t * pCmplxDst, 7 | uint32_t numSamples) 8 | { 9 | uint32_t i; 10 | 11 | for(i=0;i> 32; 30 | tempI = ((q63_t) pSrcCmplx[2*i+1] * pSrcReal[i]) >> 32; 31 | pCmplxDst[2*i+0] = ref_sat_n(tempR, 31) << 1; 32 | pCmplxDst[2*i+1] = ref_sat_n(tempI, 31) << 1; 33 | } 34 | } 35 | 36 | void ref_cmplx_mult_real_q15( 37 | q15_t * pSrcCmplx, 38 | q15_t * pSrcReal, 39 | q15_t * pCmplxDst, 40 | uint32_t numSamples) 41 | { 42 | uint32_t i; 43 | q31_t tempR, tempI; 44 | 45 | for(i=0;i> 15; 48 | tempI = ((q31_t) pSrcCmplx[2*i+1] * pSrcReal[i]) >> 15; 49 | pCmplxDst[2*i+0] = ref_sat_q15(tempR); 50 | pCmplxDst[2*i+1] = ref_sat_q15(tempI); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ControllerFunctions/sin_cos.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_sin_cos_f32( 4 | float32_t theta, 5 | float32_t * pSinVal, 6 | float32_t * pCosVal) 7 | { 8 | //theta is given in degrees 9 | *pSinVal = sinf(theta * 6.28318530717959f / 360.0f); 10 | *pCosVal = cosf(theta * 6.28318530717959f / 360.0f); 11 | } 12 | 13 | void ref_sin_cos_q31( 14 | q31_t theta, 15 | q31_t * pSinVal, 16 | q31_t * pCosVal) 17 | { 18 | //theta is given in the range [-1,1) to represent [-pi,pi) 19 | *pSinVal = (q31_t)(sinf((float32_t)theta * 3.14159265358979f / 2147483648.0f) * 2147483648.0f); 20 | *pCosVal = (q31_t)(cosf((float32_t)theta * 3.14159265358979f / 2147483648.0f) * 2147483648.0f); 21 | } 22 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/FastMathFunctions/cos.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | q31_t ref_cos_q31(q31_t x) 4 | { 5 | return (q31_t)(cosf((float32_t)x * 6.28318530717959f / 2147483648.0f) * 2147483648.0f); 6 | } 7 | 8 | q15_t ref_cos_q15(q15_t x) 9 | { 10 | return (q15_t)(cosf((float32_t)x * 6.28318530717959f / 32768.0f) * 32768.0f); 11 | } 12 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/FastMathFunctions/sin.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | q31_t ref_sin_q31(q31_t x) 4 | { 5 | return (q31_t)(sinf((float32_t)x * 6.28318530717959f / 2147483648.0f) * 2147483648.0f); 6 | } 7 | 8 | q15_t ref_sin_q15(q15_t x) 9 | { 10 | return (q15_t)(sinf((float32_t)x * 6.28318530717959f / 32768.0f) * 32768.0f); 11 | } 12 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/FastMathFunctions/sqrt.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | arm_status ref_sqrt_q31(q31_t in, q31_t * pOut) 4 | { 5 | *pOut = (q31_t)(sqrtf((float32_t)in / 2147483648.0f) * 2147483648.0f); 6 | 7 | return ARM_MATH_SUCCESS; 8 | } 9 | 10 | arm_status ref_sqrt_q15(q15_t in, q15_t * pOut) 11 | { 12 | *pOut = (q15_t)(sqrtf((float32_t)in / 32768.0f) * 32768.0f); 13 | 14 | return ARM_MATH_SUCCESS; 15 | } 16 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/HelperFunctions/ref_helper.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | float32_t scratchArray[8192*2]; 4 | 5 | arm_cfft_instance_f32 ref_cfft_sR_f32_len8192 = { 8192, 0, 0, 0 }; 6 | 7 | q31_t ref_sat_n(q31_t num, uint32_t bits) 8 | { 9 | int32_t posMax, negMin; 10 | uint32_t i; 11 | 12 | posMax = 1; 13 | for (i = 0; i < (bits - 1); i++) 14 | { 15 | posMax = posMax * 2; 16 | } 17 | 18 | if (num > 0) 19 | { 20 | posMax = (posMax - 1); 21 | 22 | if (num > posMax) 23 | { 24 | num = posMax; 25 | } 26 | } 27 | else 28 | { 29 | negMin = -posMax; 30 | 31 | if (num < negMin) 32 | { 33 | num = negMin; 34 | } 35 | } 36 | return (num); 37 | } 38 | 39 | q31_t ref_sat_q31(q63_t num) 40 | { 41 | if (num > (q63_t)INT_MAX) 42 | { 43 | return INT_MAX; 44 | } 45 | else if (num < (q63_t)0xffffffff80000000ll) 46 | { 47 | return INT_MIN; 48 | } 49 | else 50 | { 51 | return (q31_t)num; 52 | } 53 | } 54 | 55 | q15_t ref_sat_q15(q31_t num) 56 | { 57 | if (num > (q31_t)SHRT_MAX) 58 | { 59 | return SHRT_MAX; 60 | } 61 | else if (num < (q31_t)0xffff8000) 62 | { 63 | return SHRT_MIN; 64 | } 65 | else 66 | { 67 | return (q15_t)num; 68 | } 69 | } 70 | 71 | q7_t ref_sat_q7(q15_t num) 72 | { 73 | if (num > (q15_t)SCHAR_MAX) 74 | { 75 | return SCHAR_MAX; 76 | } 77 | else if (num < (q15_t)0xff80) 78 | { 79 | return SCHAR_MIN; 80 | } 81 | else 82 | { 83 | return (q7_t)num; 84 | } 85 | } 86 | 87 | float32_t ref_pow(float32_t a, uint32_t b) 88 | { 89 | uint32_t i; 90 | float32_t r = a; 91 | 92 | for(i=1;inumRows * pSrcA->numCols; 13 | 14 | for(i=0;ipData[i] = pSrcA->pData[i] + pSrcB->pData[i]; 17 | } 18 | 19 | return ARM_MATH_SUCCESS; 20 | } 21 | 22 | arm_status ref_mat_add_q31( 23 | const arm_matrix_instance_q31 * pSrcA, 24 | const arm_matrix_instance_q31 * pSrcB, 25 | arm_matrix_instance_q31 * pDst) 26 | { 27 | uint32_t i; 28 | uint32_t numSamples; /* total number of elements in the matrix */ 29 | 30 | /* Total number of samples in the input matrix */ 31 | numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols; 32 | 33 | for(i=0;ipData[i] = ref_sat_q31( (q63_t)pSrcA->pData[i] + pSrcB->pData[i]); 36 | } 37 | 38 | return ARM_MATH_SUCCESS; 39 | } 40 | 41 | arm_status ref_mat_add_q15( 42 | const arm_matrix_instance_q15 * pSrcA, 43 | const arm_matrix_instance_q15 * pSrcB, 44 | arm_matrix_instance_q15 * pDst) 45 | { 46 | uint32_t i; 47 | uint32_t numSamples; /* total number of elements in the matrix */ 48 | 49 | /* Total number of samples in the input matrix */ 50 | numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols; 51 | 52 | for(i=0;ipData[i] = ref_sat_q15( (q31_t)pSrcA->pData[i] + pSrcB->pData[i]); 55 | } 56 | 57 | return ARM_MATH_SUCCESS; 58 | } 59 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_inverse.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | arm_status ref_mat_inverse_f32( 4 | const arm_matrix_instance_f32 * pSrc, 5 | arm_matrix_instance_f32 * pDst) 6 | { 7 | float32_t det; 8 | uint32_t i, size; 9 | arm_matrix_instance_f32 tmp; 10 | 11 | tmp.numCols = pSrc->numCols; 12 | tmp.numRows = pSrc->numRows; 13 | tmp.pData = scratchArray; 14 | 15 | det = ref_detrm(pSrc->pData,scratchArray,pSrc->numCols); 16 | 17 | size = pSrc->numCols * pSrc->numCols; 18 | 19 | ref_cofact(pSrc->pData,scratchArray,scratchArray + size,pSrc->numCols); 20 | 21 | ref_mat_trans_f32(&tmp,pDst); 22 | 23 | for(i=0;ipData[i] /= det; 26 | } 27 | 28 | return ARM_MATH_SUCCESS; 29 | } 30 | 31 | arm_status ref_mat_inverse_f64( 32 | const arm_matrix_instance_f64 * pSrc, 33 | arm_matrix_instance_f64 * pDst) 34 | { 35 | float64_t det; 36 | uint32_t i, size; 37 | arm_matrix_instance_f64 tmp; 38 | 39 | tmp.numCols = pSrc->numCols; 40 | tmp.numRows = pSrc->numRows; 41 | tmp.pData = (float64_t*)scratchArray; 42 | 43 | det = ref_detrm64(pSrc->pData,(float64_t*)scratchArray,pSrc->numCols); 44 | 45 | size = pSrc->numCols * pSrc->numCols; 46 | 47 | ref_cofact64(pSrc->pData,(float64_t*)scratchArray,(float64_t*)scratchArray + size,pSrc->numCols); 48 | 49 | ref_mat_trans_f64(&tmp,pDst); 50 | 51 | for(i=0;ipData[i] /= det; 54 | } 55 | 56 | return ARM_MATH_SUCCESS; 57 | } 58 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_scale.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | arm_status ref_mat_scale_f32( 4 | const arm_matrix_instance_f32 * pSrc, 5 | float32_t scale, 6 | arm_matrix_instance_f32 * pDst) 7 | { 8 | uint32_t i; 9 | uint32_t numSamples; /* total number of elements in the matrix */ 10 | 11 | /* Total number of samples in the input matrix */ 12 | numSamples = (uint32_t) pSrc->numRows * pSrc->numCols; 13 | 14 | for(i=0;ipData[i] = pSrc->pData[i] * scale; 17 | } 18 | 19 | return ARM_MATH_SUCCESS; 20 | } 21 | 22 | arm_status ref_mat_scale_q31( 23 | const arm_matrix_instance_q31 * pSrc, 24 | q31_t scale, 25 | int32_t shift, 26 | arm_matrix_instance_q31 * pDst) 27 | { 28 | uint32_t i; 29 | uint32_t numSamples; /* total number of elements in the matrix */ 30 | int32_t totShift = shift + 1; 31 | q31_t tmp; 32 | 33 | /* Total number of samples in the input matrix */ 34 | numSamples = (uint32_t) pSrc->numRows * pSrc->numCols; 35 | 36 | for(i=0;ipData[i] * scale) >> 32; 39 | pDst->pData[i] = ref_sat_q31((q63_t)tmp << totShift ); 40 | } 41 | 42 | return ARM_MATH_SUCCESS; 43 | } 44 | 45 | arm_status ref_mat_scale_q15( 46 | const arm_matrix_instance_q15 * pSrc, 47 | q15_t scale, 48 | int32_t shift, 49 | arm_matrix_instance_q15 * pDst) 50 | { 51 | uint32_t i; 52 | uint32_t numSamples; /* total number of elements in the matrix */ 53 | int32_t totShift = 15 - shift; 54 | 55 | /* Total number of samples in the input matrix */ 56 | numSamples = (uint32_t) pSrc->numRows * pSrc->numCols; 57 | 58 | for(i=0;ipData[i] = ref_sat_q15( ((q31_t)pSrc->pData[i] * scale) >> totShift); 61 | } 62 | 63 | return ARM_MATH_SUCCESS; 64 | } 65 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_sub.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | arm_status ref_mat_sub_f32( 4 | const arm_matrix_instance_f32 * pSrcA, 5 | const arm_matrix_instance_f32 * pSrcB, 6 | arm_matrix_instance_f32 * pDst) 7 | { 8 | uint32_t i; 9 | uint32_t numSamples; /* total number of elements in the matrix */ 10 | 11 | /* Total number of samples in the input matrix */ 12 | numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols; 13 | 14 | for(i=0;ipData[i] = pSrcA->pData[i] - pSrcB->pData[i]; 17 | } 18 | 19 | return ARM_MATH_SUCCESS; 20 | } 21 | 22 | arm_status ref_mat_sub_q31( 23 | const arm_matrix_instance_q31 * pSrcA, 24 | const arm_matrix_instance_q31 * pSrcB, 25 | arm_matrix_instance_q31 * pDst) 26 | { 27 | uint32_t i; 28 | uint32_t numSamples; /* total number of elements in the matrix */ 29 | 30 | /* Total number of samples in the input matrix */ 31 | numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols; 32 | 33 | for(i=0;ipData[i] = ref_sat_q31( (q63_t)pSrcA->pData[i] - pSrcB->pData[i]); 36 | } 37 | 38 | return ARM_MATH_SUCCESS; 39 | } 40 | 41 | arm_status ref_mat_sub_q15( 42 | const arm_matrix_instance_q15 * pSrcA, 43 | const arm_matrix_instance_q15 * pSrcB, 44 | arm_matrix_instance_q15 * pDst) 45 | { 46 | uint32_t i; 47 | uint32_t numSamples; /* total number of elements in the matrix */ 48 | 49 | /* Total number of samples in the input matrix */ 50 | numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols; 51 | 52 | for(i=0;ipData[i] = ref_sat_q15( (q31_t)pSrcA->pData[i] - pSrcB->pData[i]); 55 | } 56 | 57 | return ARM_MATH_SUCCESS; 58 | } 59 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_trans.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | arm_status ref_mat_trans_f64( 4 | const arm_matrix_instance_f64 * pSrc, 5 | arm_matrix_instance_f64 * pDst) 6 | { 7 | uint64_t r,c; 8 | uint64_t numR = pSrc->numRows; 9 | uint64_t numC = pSrc->numCols; 10 | 11 | for(r=0;rpData[c*numR + r] = pSrc->pData[r*numC + c]; 16 | } 17 | } 18 | 19 | return ARM_MATH_SUCCESS; 20 | } 21 | 22 | arm_status ref_mat_trans_f32( 23 | const arm_matrix_instance_f32 * pSrc, 24 | arm_matrix_instance_f32 * pDst) 25 | { 26 | uint32_t r,c; 27 | uint32_t numR = pSrc->numRows; 28 | uint32_t numC = pSrc->numCols; 29 | 30 | for(r=0;rpData[c*numR + r] = pSrc->pData[r*numC + c]; 35 | } 36 | } 37 | 38 | return ARM_MATH_SUCCESS; 39 | } 40 | 41 | arm_status ref_mat_trans_q31( 42 | const arm_matrix_instance_q31 * pSrc, 43 | arm_matrix_instance_q31 * pDst) 44 | { 45 | uint32_t r,c; 46 | uint32_t numR = pSrc->numRows; 47 | uint32_t numC = pSrc->numCols; 48 | 49 | for(r=0;rpData[c*numR + r] = pSrc->pData[r*numC + c]; 54 | } 55 | } 56 | 57 | return ARM_MATH_SUCCESS; 58 | } 59 | 60 | arm_status ref_mat_trans_q15( 61 | const arm_matrix_instance_q15 * pSrc, 62 | arm_matrix_instance_q15 * pDst) 63 | { 64 | uint32_t r,c; 65 | uint32_t numR = pSrc->numRows; 66 | uint32_t numC = pSrc->numCols; 67 | 68 | for(r=0;rpData[c*numR + r] = pSrc->pData[r*numC + c]; 73 | } 74 | } 75 | 76 | return ARM_MATH_SUCCESS; 77 | } 78 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/StatisticsFunctions/max.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_max_f32( 4 | float32_t * pSrc, 5 | uint32_t blockSize, 6 | float32_t * pResult, 7 | uint32_t * pIndex) 8 | { 9 | uint32_t i, ind=0; 10 | float32_t max=-FLT_MAX; 11 | 12 | for(i=0;i pSrc[i]) 15 | { 16 | min = pSrc[i]; 17 | ind = i; 18 | } 19 | } 20 | *pResult = min; 21 | *pIndex = ind; 22 | } 23 | 24 | void ref_min_q31( 25 | q31_t * pSrc, 26 | uint32_t blockSize, 27 | q31_t * pResult, 28 | uint32_t * pIndex) 29 | { 30 | uint32_t i, ind=0; 31 | q31_t min=INT_MAX; 32 | 33 | for(i=0;i pSrc[i]) 36 | { 37 | min = pSrc[i]; 38 | ind = i; 39 | } 40 | } 41 | *pResult = min; 42 | *pIndex = ind; 43 | } 44 | 45 | void ref_min_q15( 46 | q15_t * pSrc, 47 | uint32_t blockSize, 48 | q15_t * pResult, 49 | uint32_t * pIndex) 50 | { 51 | uint32_t i, ind=0; 52 | q15_t min=SHRT_MAX; 53 | 54 | for(i=0;i pSrc[i]) 57 | { 58 | min = pSrc[i]; 59 | ind = i; 60 | } 61 | } 62 | *pResult = min; 63 | *pIndex = ind; 64 | } 65 | 66 | void ref_min_q7( 67 | q7_t * pSrc, 68 | uint32_t blockSize, 69 | q7_t * pResult, 70 | uint32_t * pIndex) 71 | { 72 | uint32_t i, ind=0; 73 | q7_t min=SCHAR_MAX; 74 | 75 | for(i=0;i pSrc[i]) 78 | { 79 | min = pSrc[i]; 80 | ind = i; 81 | } 82 | } 83 | *pResult = min; 84 | *pIndex = ind; 85 | } 86 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/StatisticsFunctions/power.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_power_f32( 4 | float32_t * pSrc, 5 | uint32_t blockSize, 6 | float32_t * pResult) 7 | { 8 | uint32_t i; 9 | float32_t sumsq=0; 10 | 11 | for(i=0;i> 14; 29 | } 30 | *pResult = sumsq; 31 | } 32 | 33 | void ref_power_q15( 34 | q15_t * pSrc, 35 | uint32_t blockSize, 36 | q63_t * pResult) 37 | { 38 | uint32_t i; 39 | q63_t sumsq=0; 40 | 41 | for(i=0;i> 31; 35 | tmp2 = ref_sat_q31(tmp1); 36 | 37 | /* GCC M0 problem: __aeabi_f2iz(QNAN) returns not 0 */ 38 | help_float = (sqrtf((float)tmp2 / 2147483648.0f) * 2147483648.0f); 39 | /* Checking for a NAN value in help_float */ 40 | if (((*((int *)(&help_float))) & 0x7FC00000) == 0x7FC00000) { 41 | help_float = 0; 42 | } 43 | *pResult = (q31_t)(help_float); 44 | 45 | // *pResult = (q31_t)(sqrtf((float)tmp2 / 2147483648.0f) * 2147483648.0f); 46 | } 47 | 48 | void ref_rms_q15( 49 | q15_t * pSrc, 50 | uint32_t blockSize, 51 | q15_t * pResult) 52 | { 53 | uint32_t i; 54 | q63_t sumsq=0; 55 | q31_t tmp1; 56 | q15_t tmp2; 57 | 58 | for(i=0;i> 15; 63 | tmp2 = ref_sat_q15(tmp1); 64 | *pResult = (q15_t)(sqrtf((float)tmp2 / 32768.0f) * 32768.0f); 65 | } 66 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/StatisticsFunctions/std.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_std_f32( 4 | float32_t * pSrc, 5 | uint32_t blockSize, 6 | float32_t * pResult) 7 | { 8 | uint32_t i; 9 | float32_t sum=0, sumsq=0; 10 | 11 | if (blockSize == 1) 12 | { 13 | *pResult = 0; 14 | return; 15 | } 16 | 17 | for(i=0;i> 8; 43 | sum += in; 44 | sumsq += (q63_t)in * in; 45 | } 46 | sumsq /= (q63_t)(blockSize - 1); 47 | sum = sum * sum / (q63_t)(blockSize * (blockSize - 1)); 48 | *pResult = (q31_t)(sqrtf((float)( (sumsq - sum) >> 15) / 2147483648.0f ) * 2147483648.0f); 49 | } 50 | 51 | void ref_std_q15( 52 | q15_t * pSrc, 53 | uint32_t blockSize, 54 | q15_t * pResult) 55 | { 56 | uint32_t i; 57 | q31_t sum=0; 58 | q63_t sumsq=0; 59 | 60 | if (blockSize == 1) 61 | { 62 | *pResult = 0; 63 | return; 64 | } 65 | 66 | for(i=0;i> 15) / 32768.0f ) * 32768.0f); 74 | } 75 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/StatisticsFunctions/var.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_var_f32( 4 | float32_t * pSrc, 5 | uint32_t blockSize, 6 | float32_t * pResult) 7 | { 8 | uint32_t i; 9 | float32_t sum=0, sumsq=0; 10 | 11 | if (blockSize == 1) 12 | { 13 | *pResult = 0; 14 | return; 15 | } 16 | 17 | for(i=0;i> 8; 43 | sum += in; 44 | sumsq += (q63_t)in * in; 45 | } 46 | *pResult = (sumsq - sum * sum / (q31_t)blockSize) / ((q31_t)blockSize - 1) >> 15; 47 | } 48 | 49 | void ref_var_q15( 50 | q15_t * pSrc, 51 | uint32_t blockSize, 52 | q15_t * pResult) 53 | { 54 | uint32_t i; 55 | q31_t sum=0; 56 | q63_t sumsq=0; 57 | 58 | if (blockSize == 1) 59 | { 60 | *pResult = 0; 61 | return; 62 | } 63 | 64 | for(i=0;i> 15; 70 | } 71 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/SupportFunctions/copy.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | void ref_copy_f32( 4 | float32_t * pSrc, 5 | float32_t * pDst, 6 | uint32_t blockSize) 7 | { 8 | uint32_t i; 9 | 10 | for(i=0;i> 16; 13 | } 14 | } 15 | 16 | void ref_q31_to_q7( 17 | q31_t * pSrc, 18 | q7_t * pDst, 19 | uint32_t blockSize) 20 | { 21 | uint32_t i; 22 | 23 | for(i=0;i> 24; 26 | } 27 | } 28 | 29 | void ref_q15_to_q31( 30 | q15_t * pSrc, 31 | q31_t * pDst, 32 | uint32_t blockSize) 33 | { 34 | uint32_t i; 35 | 36 | for(i=0;i> 8; 52 | } 53 | } 54 | 55 | void ref_q7_to_q31( 56 | q7_t * pSrc, 57 | q31_t * pDst, 58 | uint32_t blockSize) 59 | { 60 | uint32_t i; 61 | 62 | for(i=0;i 0.0f ? 0.5f : -0.5f; //round 16 | pDst[i] = ref_sat_q31((q63_t)in); //cast and saturate 17 | } 18 | } 19 | 20 | void ref_float_to_q15( 21 | float32_t * pSrc, 22 | q15_t * pDst, 23 | uint32_t blockSize) 24 | { 25 | uint32_t i; 26 | float32_t in; 27 | 28 | for(i=0;i 0.0f ? 0.5f : -0.5f; 33 | pDst[i] = ref_sat_q15((q31_t)in); 34 | } 35 | } 36 | 37 | void ref_float_to_q7( 38 | float32_t * pSrc, 39 | q7_t * pDst, 40 | uint32_t blockSize) 41 | { 42 | uint32_t i; 43 | float32_t in; 44 | 45 | for(i=0;i 0.0f ? 0.5f : -0.5f; 50 | pDst[i] = ref_sat_q7((q15_t)in); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/TransformFunctions/bitreversal.c: -------------------------------------------------------------------------------- 1 | #include "ref.h" 2 | 3 | 4 | ;/* 5 | ;* @brief In-place bit reversal function. 6 | ;* @param[in, out] *pSrc points to the in-place buffer of unknown 32-bit data type. 7 | ;* @param[in] bitRevLen bit reversal table length 8 | ;* @param[in] *pBitRevTab points to bit reversal table. 9 | ;* @return none. 10 | ;*/ 11 | void arm_bitreversal_32(uint32_t *pSrc, uint32_t bitRevLen, uint32_t *pBitRevTab) 12 | { 13 | uint32_t a,b,i,tmp; 14 | 15 | for(i=0; istate, 0, 3U * sizeof(float32_t)); 49 | } 50 | 51 | /** 52 | * @} end of PID group 53 | */ 54 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_q15.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_pid_reset_q15.c 4 | * Description: Q15 PID Control reset function 5 | * 6 | * $Date: 27. January 2017 7 | * $Revision: V.1.5.1 8 | * 9 | * Target Processor: Cortex-M cores 10 | * -------------------------------------------------------------------- */ 11 | /* 12 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 13 | * 14 | * SPDX-License-Identifier: Apache-2.0 15 | * 16 | * Licensed under the Apache License, Version 2.0 (the License); you may 17 | * not use this file except in compliance with the License. 18 | * You may obtain a copy of the License at 19 | * 20 | * www.apache.org/licenses/LICENSE-2.0 21 | * 22 | * Unless required by applicable law or agreed to in writing, software 23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25 | * See the License for the specific language governing permissions and 26 | * limitations under the License. 27 | */ 28 | 29 | #include "arm_math.h" 30 | 31 | /** 32 | * @addtogroup PID 33 | * @{ 34 | */ 35 | 36 | /** 37 | * @brief Reset function for the Q15 PID Control. 38 | * @param[in] *S Instance pointer of PID control data structure. 39 | * @return none. 40 | * \par Description: 41 | * The function resets the state buffer to zeros. 42 | */ 43 | void arm_pid_reset_q15( 44 | arm_pid_instance_q15 * S) 45 | { 46 | /* Reset state to zero, The size will be always 3 samples */ 47 | memset(S->state, 0, 3U * sizeof(q15_t)); 48 | } 49 | 50 | /** 51 | * @} end of PID group 52 | */ 53 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_q31.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_pid_reset_q31.c 4 | * Description: Q31 PID Control reset function 5 | * 6 | * $Date: 27. January 2017 7 | * $Revision: V.1.5.1 8 | * 9 | * Target Processor: Cortex-M cores 10 | * -------------------------------------------------------------------- */ 11 | /* 12 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 13 | * 14 | * SPDX-License-Identifier: Apache-2.0 15 | * 16 | * Licensed under the Apache License, Version 2.0 (the License); you may 17 | * not use this file except in compliance with the License. 18 | * You may obtain a copy of the License at 19 | * 20 | * www.apache.org/licenses/LICENSE-2.0 21 | * 22 | * Unless required by applicable law or agreed to in writing, software 23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25 | * See the License for the specific language governing permissions and 26 | * limitations under the License. 27 | */ 28 | 29 | #include "arm_math.h" 30 | 31 | /** 32 | * @addtogroup PID 33 | * @{ 34 | */ 35 | 36 | /** 37 | * @brief Reset function for the Q31 PID Control. 38 | * @param[in] *S Instance pointer of PID control data structure. 39 | * @return none. 40 | * \par Description: 41 | * The function resets the state buffer to zeros. 42 | */ 43 | void arm_pid_reset_q31( 44 | arm_pid_instance_q31 * S) 45 | { 46 | 47 | /* Clear the state buffer. The size will be always 3 samples */ 48 | memset(S->state, 0, 3U * sizeof(q31_t)); 49 | } 50 | 51 | /** 52 | * @} end of PID group 53 | */ 54 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x6.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x6.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x8.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x8.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030xc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030xc.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f031x6.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f031x6.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f038xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f038xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f048xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f048xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f051x8.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f051x8.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f058xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f058xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f070x6.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f070x6.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f070xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f070xb.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f071xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f071xb.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f078xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f078xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f091xc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f091xc.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f098xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f098xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f030x6_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x08007FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20000FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f030x8_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f030xc_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f031x6_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x08007FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20000FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f038xx_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x08007FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20000FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f042x6_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x08007FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x200017FF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f048xx_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x08007FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x200017FF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f051x8_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f058xx_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f070x6_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x08007FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x200017FF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f070xb_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f071xb_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f072xb_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f078xx_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f091xc_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f091xc_sram.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x20003FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20004000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | 17 | define memory mem with size = 4G; 18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 20 | 21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 23 | 24 | initialize by copy { readwrite }; 25 | do not initialize { section .noinit }; 26 | 27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 28 | 29 | place in ROM_region { readonly }; 30 | place in RAM_region { readwrite, 31 | block CSTACK, block HEAP }; -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f098xx_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | define memory mem with size = 4G; 17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 19 | 20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 22 | 23 | initialize by copy { readwrite }; 24 | do not initialize { section .noinit }; 25 | 26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 27 | 28 | place in ROM_region { readonly }; 29 | place in RAM_region { readwrite, 30 | block CSTACK, block HEAP }; 31 | 32 | export symbol __ICFEDIT_region_RAM_start__; 33 | export symbol __ICFEDIT_region_RAM_end__; 34 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/linker/stm32f098xx_sram.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x20003FFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20004000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x400; 13 | define symbol __ICFEDIT_size_heap__ = 0x200; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | 17 | define memory mem with size = 4G; 18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 20 | 21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 23 | 24 | initialize by copy { readwrite }; 25 | do not initialize { section .noinit }; 26 | 27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 28 | 29 | place in ROM_region { readonly }; 30 | place in RAM_region { readwrite, 31 | block CSTACK, block HEAP }; -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Lib/ARM/arm_cortexM0b_math.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Lib/ARM/arm_cortexM0b_math.lib -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Lib/ARM/arm_cortexM0l_math.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Lib/ARM/arm_cortexM0l_math.lib -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Lib/GCC/libarm_cortexM0l_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Lib/GCC/libarm_cortexM0l_math.a -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Lib/IAR/iar_cortexM0b_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Lib/IAR/iar_cortexM0b_math.a -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Lib/IAR/iar_cortexM0l_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/CMSIS/Lib/IAR/iar_cortexM0l_math.a -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/cifar10/RTE/_ARMCM0/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_cifar10' 7 | * Target: 'ARMCM0' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | #define RTE_Compiler_EventRecorder 20 | #define RTE_Compiler_EventRecorder_DAP 21 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 22 | #define RTE_Compiler_IO_STDOUT_EVR /* Compiler I/O: STDOUT EVR */ 23 | 24 | #endif /* RTE_COMPONENTS_H */ 25 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/cifar10/RTE/_ARMCM3/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_cifar10' 7 | * Target: 'ARMCM3' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM3.h" 18 | 19 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 20 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 21 | 22 | #endif /* RTE_COMPONENTS_H */ 23 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/cifar10/RTE/_ARMCM4_FP/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_cifar10' 7 | * Target: 'ARMCM4_FP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM4_FP.h" 18 | 19 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 20 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 21 | 22 | #endif /* RTE_COMPONENTS_H */ 23 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/cifar10/RTE/_ARMCM7_SP/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_cifar10' 7 | * Target: 'ARMCM7_SP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM7_SP.h" 18 | 19 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 20 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 21 | 22 | #endif /* RTE_COMPONENTS_H */ 23 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/cifar10/arm_nnexamples_cifar10_parameter.h: -------------------------------------------------------------------------------- 1 | #define CONV1_IM_DIM 32 2 | #define CONV1_IM_CH 3 3 | #define CONV1_KER_DIM 5 4 | #define CONV1_PADDING 2 5 | #define CONV1_STRIDE 1 6 | #define CONV1_OUT_CH 32 7 | #define CONV1_OUT_DIM 32 8 | 9 | #define POOL1_KER_DIM 3 10 | #define POOL1_STRIDE 2 11 | #define POOL1_PADDING 0 12 | #define POOL1_OUT_DIM 16 13 | 14 | #define CONV2_IM_DIM 16 15 | #define CONV2_IM_CH 32 16 | #define CONV2_KER_DIM 5 17 | #define CONV2_PADDING 2 18 | #define CONV2_STRIDE 1 19 | #define CONV2_OUT_CH 16 20 | #define CONV2_OUT_DIM 16 21 | 22 | #define POOL2_KER_DIM 3 23 | #define POOL2_STRIDE 2 24 | #define POOL2_PADDING 0 25 | #define POOL2_OUT_DIM 8 26 | 27 | #define CONV3_IM_DIM 8 28 | #define CONV3_IM_CH 16 29 | #define CONV3_KER_DIM 5 30 | #define CONV3_PADDING 2 31 | #define CONV3_STRIDE 1 32 | #define CONV3_OUT_CH 32 33 | #define CONV3_OUT_DIM 8 34 | 35 | #define POOL3_KER_DIM 3 36 | #define POOL3_STRIDE 2 37 | #define POOL3_PADDING 0 38 | #define POOL3_OUT_DIM 4 39 | 40 | #define IP1_DIM 4*4*32 41 | #define IP1_IM_DIM 4 42 | #define IP1_IM_CH 32 43 | #define IP1_OUT 10 44 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/RTE/_ARMCM0/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_gru' 7 | * Target: 'ARMCM0' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | #define RTE_Compiler_EventRecorder 20 | #define RTE_Compiler_EventRecorder_DAP 21 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 22 | #define RTE_Compiler_IO_STDOUT_EVR /* Compiler I/O: STDOUT EVR */ 23 | 24 | #endif /* RTE_COMPONENTS_H */ 25 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/RTE/_ARMCM3/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_gru' 7 | * Target: 'ARMCM3' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM3.h" 18 | 19 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 20 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 21 | 22 | #endif /* RTE_COMPONENTS_H */ 23 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/RTE/_ARMCM4_FP/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_gru' 7 | * Target: 'ARMCM4_FP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM4_FP.h" 18 | 19 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 20 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 21 | 22 | #endif /* RTE_COMPONENTS_H */ 23 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/RTE/_ARMCM7_SP/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_gru' 7 | * Target: 'ARMCM7_SP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM7_SP.h" 18 | 19 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 20 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 21 | 22 | #endif /* RTE_COMPONENTS_H */ 23 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM0/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_cifar10' 7 | * Target: 'ARMCM0' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM3/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_nn_test' 7 | * Target: 'ARMCM3' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM3.h" 18 | 19 | #define RTE_Compiler_IO_STDERR /* Compiler I/O: STDERR */ 20 | #define RTE_Compiler_IO_STDERR_ITM /* Compiler I/O: STDERR ITM */ 21 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 22 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 23 | #define RTE_Compiler_IO_TTY /* Compiler I/O: TTY */ 24 | #define RTE_Compiler_IO_TTY_ITM /* Compiler I/O: TTY ITM */ 25 | 26 | #endif /* RTE_COMPONENTS_H */ 27 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM4_FP/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_nn_test' 7 | * Target: 'ARMCM4_FP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM4_FP.h" 18 | 19 | #define RTE_Compiler_IO_STDERR /* Compiler I/O: STDERR */ 20 | #define RTE_Compiler_IO_STDERR_ITM /* Compiler I/O: STDERR ITM */ 21 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 22 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 23 | #define RTE_Compiler_IO_TTY /* Compiler I/O: TTY */ 24 | #define RTE_Compiler_IO_TTY_ITM /* Compiler I/O: TTY ITM */ 25 | 26 | #endif /* RTE_COMPONENTS_H */ 27 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/RTE/_ARMCM7_SP/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'arm_nnexamples_nn_test' 7 | * Target: 'ARMCM7_SP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM7_SP.h" 18 | 19 | #define RTE_Compiler_IO_STDERR /* Compiler I/O: STDERR */ 20 | #define RTE_Compiler_IO_STDERR_ITM /* Compiler I/O: STDERR ITM */ 21 | #define RTE_Compiler_IO_STDOUT /* Compiler I/O: STDOUT */ 22 | #define RTE_Compiler_IO_STDOUT_ITM /* Compiler I/O: STDOUT ITM */ 23 | #define RTE_Compiler_IO_TTY /* Compiler I/O: TTY */ 24 | #define RTE_Compiler_IO_TTY_ITM /* Compiler I/O: TTY ITM */ 25 | 26 | #endif /* RTE_COMPONENTS_H */ 27 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/Ref_Implementations/arm_relu_ref.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the License); you may 7 | * not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include "arm_math.h" 20 | #include "arm_nnfunctions.h" 21 | 22 | void arm_relu_q7_ref(q7_t * data, uint16_t size) 23 | { 24 | uint16_t i; 25 | 26 | for (i = 0; i < size; i++) 27 | { 28 | if (data[i] < 0) 29 | data[i] = 0; 30 | } 31 | } 32 | 33 | void arm_relu_q15_ref(q15_t * data, uint16_t size) 34 | { 35 | uint16_t i; 36 | 37 | for (i = 0; i < size; i++) 38 | { 39 | if (data[i] < 0) 40 | data[i] = 0; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/NN/NN_Lib_Tests/nn_test/arm_nnexamples_nn_test.h: -------------------------------------------------------------------------------- 1 | #ifndef _MAIN_H_ 2 | #define _MAIN_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "arm_math.h" 9 | 10 | #include "arm_nnfunctions.h" 11 | #include "ref_functions.h" 12 | 13 | extern int test_index; 14 | extern q7_t test_flags[50]; 15 | 16 | void initialize_results_q7(q7_t * ref, q7_t * opt, int length) 17 | { 18 | arm_fill_q7(0, ref, length); 19 | arm_fill_q7(37, opt, length); 20 | } 21 | 22 | void initialize_results_q15(q15_t * ref, q15_t * opt, int length) 23 | { 24 | arm_fill_q15(0, ref, length); 25 | arm_fill_q15(0x5F5, opt, length); 26 | } 27 | 28 | void verify_results_q7(q7_t * ref, q7_t * opt, int length) 29 | { 30 | 31 | bool if_match = true; 32 | 33 | for (int i = 0; i < length; i++) 34 | { 35 | if (ref[i] != opt[i]) 36 | { 37 | printf("Output mismatch at %d, expected %d, actual %d\r\n", i, ref[i], opt[i]); 38 | 39 | if_match = false; 40 | } 41 | } 42 | 43 | if (if_match == true) 44 | { 45 | printf("Outputs match.\r\n\r\n"); 46 | test_flags[test_index++] = 0; 47 | } else { 48 | test_flags[test_index++] = 1; 49 | } 50 | 51 | } 52 | 53 | void verify_results_q15(q15_t * ref, q15_t * opt, int length) 54 | { 55 | 56 | bool if_match = true; 57 | 58 | for (int i = 0; i < length; i++) 59 | { 60 | if (ref[i] != opt[i]) 61 | { 62 | printf("Output mismatch at %d, expected %d, actual %d\r\n", i, ref[i], opt[i]); 63 | 64 | if_match = false; 65 | } 66 | } 67 | 68 | if (if_match == true) 69 | { 70 | printf("Outputs match.\r\n\r\n"); 71 | test_flags[test_index++] = 0; 72 | } else { 73 | test_flags[test_index++] = 1; 74 | } 75 | 76 | } 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_timebase_rtc_alarm_template.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_timebase_rtc_alarm_template.c -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_timebase_rtc_wakeup_template.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_timebase_rtc_wakeup_template.c -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_wwdg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_wwdg.c -------------------------------------------------------------------------------- /firmware/Inc/images/bar.h: -------------------------------------------------------------------------------- 1 | #ifndef __BAR_H 2 | #define __BAR_H 3 | 4 | const uint16_t bar[] = { 5 | 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, 6 | 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, 7 | 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, 8 | 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /firmware/Inc/images/bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/bar.png -------------------------------------------------------------------------------- /firmware/Inc/images/bar.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/bar.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/bar_i.h: -------------------------------------------------------------------------------- 1 | #ifndef __BAR_I_H 2 | #define __BAR_I_H 3 | 4 | const uint16_t bar_i[] = { 5 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 6 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 7 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 8 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /firmware/Inc/images/bar_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/bar_i.png -------------------------------------------------------------------------------- /firmware/Inc/images/bar_i.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/bar_i.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/bb.h: -------------------------------------------------------------------------------- 1 | #ifndef __BB_H 2 | #define __BB_H 3 | 4 | const uint16_t bb[] = { 5 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 6 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 7 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 8 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 9 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 10 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 11 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 12 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 13 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 14 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 15 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 16 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 17 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 18 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 19 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 20 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 21 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 22 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 23 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 24 | 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /firmware/Inc/images/bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/bb.png -------------------------------------------------------------------------------- /firmware/Inc/images/bb.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/bb.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/cal_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/cal_i.png -------------------------------------------------------------------------------- /firmware/Inc/images/cal_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/cal_n.png -------------------------------------------------------------------------------- /firmware/Inc/images/cal_n.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/cal_n.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/cnt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/cnt.png -------------------------------------------------------------------------------- /firmware/Inc/images/cnt.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/cnt.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/cnt_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/cnt_i.png -------------------------------------------------------------------------------- /firmware/Inc/images/gram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/gram.png -------------------------------------------------------------------------------- /firmware/Inc/images/gram.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/gram.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/gram_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/gram_i.png -------------------------------------------------------------------------------- /firmware/Inc/images/image_converter.py: -------------------------------------------------------------------------------- 1 | #!/bin/python3.8 2 | from PIL import Image 3 | import sys 4 | import os 5 | 6 | def rgb_hex565(red, green, blue): 7 | return ("0x%0.4X" % ((int(blue / 255 * 31) << 11) | (int(red / 255 * 63) << 5) | (int(green / 255 * 31)))) 8 | 9 | def generate_header(file): 10 | nm = os.path.splitext(file)[0] 11 | of = open(nm+".h","w+") 12 | hf = open('image_header.h', 'a+') 13 | hf.write("#include \"" + nm + ".h\"\r\n") 14 | hf.close() 15 | im = Image.open(file, 'r') 16 | width, height = im.size 17 | pixel_values = list(im.transpose(Image.ROTATE_180).getdata()) 18 | 19 | of.write("#ifndef __{}_H\r\n".format(nm.upper())) 20 | of.write("#define __{}_H\r\n".format(nm.upper())) 21 | of.write("\r\n") 22 | of.write("const uint16_t {}[] = {{\r\n".format(nm.lower())) 23 | for index,i in enumerate(pixel_values): 24 | of.write("{}".format(rgb_hex565(*i[:3]))) 25 | if(index < len(pixel_values)-1): 26 | of.write(",") 27 | if((index+1) % 10 == 0): 28 | of.write("\r\n") 29 | of.write("};\r\n") 30 | of.write("\r\n") 31 | of.write("#endif\r\n") 32 | of.close() 33 | 34 | hf = open('image_header.h', 'w+') 35 | hf.write("#ifndef __IMAGE_HEADERS_H\r\n") 36 | hf.write("#define __IMAGE_HEADERS_H\r\n") 37 | hf.write("\r\n") 38 | hf.close() 39 | 40 | for file in os.listdir(sys.argv[1]): 41 | if file.endswith(".png"): 42 | print(os.path.join(sys.argv[1], file)) 43 | generate_header(file) 44 | 45 | hf = open('image_header.h', 'a+') 46 | hf.write("\r\n") 47 | hf.write("#endif") 48 | hf.close() 49 | -------------------------------------------------------------------------------- /firmware/Inc/images/image_header.h: -------------------------------------------------------------------------------- 1 | #ifndef __IMAGE_HEADERS_H 2 | #define __IMAGE_HEADERS_H 3 | 4 | #include "cal_i.h" 5 | #include "cnt.h" 6 | #include "cal_n.h" 7 | #include "bar.h" 8 | #include "tara_red.h" 9 | #include "cnt_i.h" 10 | #include "bb.h" 11 | #include "tara_green.h" 12 | #include "gram.h" 13 | #include "tara.h" 14 | #include "bar_i.h" 15 | #include "gram_i.h" 16 | 17 | #endif -------------------------------------------------------------------------------- /firmware/Inc/images/tara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/tara.png -------------------------------------------------------------------------------- /firmware/Inc/images/tara_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/tara_green.png -------------------------------------------------------------------------------- /firmware/Inc/images/tara_green.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/tara_green.xcf -------------------------------------------------------------------------------- /firmware/Inc/images/tara_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/tara_red.png -------------------------------------------------------------------------------- /firmware/Inc/images/tara_red.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/firmware/Inc/images/tara_red.xcf -------------------------------------------------------------------------------- /firmware/Inc/usbd_cdc_interface.h: -------------------------------------------------------------------------------- 1 | #ifndef __USBD_CDC_IF_H 2 | #define __USBD_CDC_IF_H 3 | 4 | #include "usbd_cdc.h" 5 | 6 | #define APP_RX_DATA_SIZE 64 7 | #define APP_TX_DATA_SIZE 64 8 | 9 | uint8_t UserRxBuffer[APP_RX_DATA_SIZE]; 10 | uint8_t UserTxBuffer[APP_TX_DATA_SIZE]; 11 | 12 | #define CDC_POLLING_INTERVAL 150 /* in ms. The max is 65 and the min is 1 */ 13 | 14 | extern USBD_CDC_ItfTypeDef USBD_CDC_fops; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /firmware/Src/usbd_cdc_interface.c: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | 3 | USBD_CDC_LineCodingTypeDef LineCoding = 4 | { 5 | 115200, /* baud rate*/ 6 | 0x00, /* stop bits-1*/ 7 | 0x00, /* parity - none*/ 8 | 0x08 /* nb. of bits 8*/ 9 | }; 10 | 11 | extern USBD_HandleTypeDef USBD_Device; 12 | 13 | static int8_t CDC_Itf_Init (void); 14 | static int8_t CDC_Itf_DeInit (void); 15 | static int8_t CDC_Itf_Control (uint8_t cmd, uint8_t* pbuf, uint16_t length); 16 | static int8_t CDC_Itf_Receive (uint8_t* pbuf, uint32_t *Len); 17 | 18 | static void ComPort_Config(void); 19 | 20 | USBD_CDC_ItfTypeDef USBD_CDC_fops = 21 | { 22 | CDC_Itf_Init, 23 | CDC_Itf_DeInit, 24 | CDC_Itf_Control, 25 | CDC_Itf_Receive 26 | }; 27 | 28 | static int8_t CDC_Itf_Init(void) 29 | { 30 | USBD_CDC_SetTxBuffer(&USBD_Device, UserTxBuffer, 0); 31 | USBD_CDC_SetRxBuffer(&USBD_Device, UserRxBuffer); 32 | 33 | return (USBD_OK); 34 | } 35 | 36 | static int8_t CDC_Itf_DeInit (void){ 37 | 38 | } 39 | 40 | static int8_t CDC_Itf_Control (uint8_t cmd, uint8_t* pbuf, uint16_t length){ 41 | 42 | } 43 | 44 | static int8_t CDC_Itf_Receive (uint8_t* pbuf, uint32_t *Len){ 45 | 46 | } 47 | -------------------------------------------------------------------------------- /gerber/scale-F_Mask.gts: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1* 2 | G04 #@! TF.CreationDate,2020-03-02T22:50:26+01:00* 3 | G04 #@! TF.ProjectId,scale,7363616c-652e-46b6-9963-61645f706362,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Soldermask,Top* 6 | G04 #@! TF.FilePolarity,Negative* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5-52549c5~84~ubuntu19.10.1) date 2020-03-02 22:50:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.200000*% 14 | %ADD11C,3.450000*% 15 | %ADD12O,2.100000X1.000000*% 16 | %ADD13O,1.600000X1.000000*% 17 | %ADD14C,0.650000*% 18 | %ADD15C,0.985520*% 19 | %ADD16C,0.988060*% 20 | %ADD17C,0.784860*% 21 | G04 APERTURE END LIST* 22 | D10* 23 | X222671428Y-103103571D02* 24 | X222614285Y-103160714D01* 25 | X222442857Y-103217857D01* 26 | X222328571Y-103217857D01* 27 | X222157142Y-103160714D01* 28 | X222042857Y-103046428D01* 29 | X221985714Y-102932142D01* 30 | X221928571Y-102703571D01* 31 | X221928571Y-102532142D01* 32 | X221985714Y-102303571D01* 33 | X222042857Y-102189285D01* 34 | X222157142Y-102075000D01* 35 | X222328571Y-102017857D01* 36 | X222442857Y-102017857D01* 37 | X222614285Y-102075000D01* 38 | X222671428Y-102132142D01* 39 | D11* 40 | X220800000Y-108400000D03* 41 | D12* 42 | X221465000Y-112630000D03* 43 | X221465000Y-121270000D03* 44 | D13* 45 | X225645000Y-112630000D03* 46 | X225645000Y-121270000D03* 47 | D14* 48 | X221995000Y-119840000D03* 49 | X221995000Y-114060000D03* 50 | D15* 51 | X187010000Y-104934000D03* 52 | X187010000Y-106966000D03* 53 | D16* 54 | X192090000Y-105950000D03* 55 | D17* 56 | X188280000Y-106585000D03* 57 | X188280000Y-105315000D03* 58 | X189550000Y-106585000D03* 59 | X189550000Y-105315000D03* 60 | X190820000Y-106585000D03* 61 | X190820000Y-105315000D03* 62 | M02* 63 | -------------------------------------------------------------------------------- /gerber/scale-F_Paste.gtp: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1* 2 | G04 #@! TF.CreationDate,2020-03-02T22:50:26+01:00* 3 | G04 #@! TF.ProjectId,scale,7363616c-652e-46b6-9963-61645f706362,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Paste,Top* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5-52549c5~84~ubuntu19.10.1) date 2020-03-02 22:50:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | G04 APERTURE END LIST* 14 | M02* 15 | -------------------------------------------------------------------------------- /gerber/scale-F_SilkS.gto: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1* 2 | G04 #@! TF.CreationDate,2020-03-02T22:50:26+01:00* 3 | G04 #@! TF.ProjectId,scale,7363616c-652e-46b6-9963-61645f706362,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Legend,Top* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5-52549c5~84~ubuntu19.10.1) date 2020-03-02 22:50:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.120000*% 14 | %ADD11C,0.127000*% 15 | G04 APERTURE END LIST* 16 | D10* 17 | X215475000Y-124650000D02* 18 | X215475000Y-124150001D01* 19 | X215475000Y-124650000D02* 20 | X214975001Y-124650000D01* 21 | X187525000Y-124650000D02* 22 | X187525000Y-124150001D01* 23 | X187525000Y-124650000D02* 24 | X188024999Y-124650000D01* 25 | X187525000Y-111150000D02* 26 | X188024999Y-111150000D01* 27 | X187525000Y-111150000D02* 28 | X187525000Y-111649999D01* 29 | X215475000Y-111150000D02* 30 | X215475000Y-111649999D01* 31 | X215475000Y-111150000D02* 32 | X214975001Y-111150000D01* 33 | D11* 34 | X185994000Y-106902500D02* 35 | G75* 36 | G03X186946500Y-107855000I952500J0D01* 37 | G01* 38 | X186946500Y-104045000D02* 39 | G75* 40 | G03X185994000Y-104997500I0J-952500D01* 41 | G01* 42 | X185994000Y-106902500D02* 43 | X185994000Y-104997500D01* 44 | X192813900Y-106673900D02* 45 | G75* 46 | G03X192813900Y-105226100I-723900J723900D01* 47 | G01* 48 | X192813900Y-106673900D02* 49 | X191632800Y-107855000D01* 50 | X192813900Y-105226100D02* 51 | X191632800Y-104045000D01* 52 | X186946500Y-107855000D02* 53 | X191632800Y-107855000D01* 54 | X186946500Y-104045000D02* 55 | X191632800Y-104045000D01* 56 | M02* 57 | -------------------------------------------------------------------------------- /gerber/scale-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad 5.1.5-52549c5~84~ubuntu19.10.1} date Mo 02 Mär 2020 22:50:28 CET 3 | ; FORMAT={-:-/ absolute / inch / decimal} 4 | ; #@! TF.CreationDate,2020-03-02T22:50:28+01:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1 6 | ; #@! TF.FileFunction,NonPlated,1,2,NPTH 7 | FMAT,2 8 | INCH 9 | T1C0.0256 10 | T2C0.0388 11 | T3C0.0389 12 | T4C0.1358 13 | % 14 | G90 15 | G05 16 | T1 17 | X8.74Y-4.4906 18 | X8.74Y-4.7181 19 | T2 20 | X7.3626Y-4.1313 21 | X7.3626Y-4.2113 22 | T3 23 | X7.5626Y-4.1713 24 | T4 25 | X8.6929Y-4.2677 26 | T0 27 | M30 28 | -------------------------------------------------------------------------------- /gerber_silk/README.md: -------------------------------------------------------------------------------- 1 | # note: There is a bug in the gerber files. The display has to be bodged in this version, order at your own risk! 2 | -------------------------------------------------------------------------------- /gerber_silk/scale-F_Mask.gts: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1* 2 | G04 #@! TF.CreationDate,2020-03-02T22:50:26+01:00* 3 | G04 #@! TF.ProjectId,scale,7363616c-652e-46b6-9963-61645f706362,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Soldermask,Top* 6 | G04 #@! TF.FilePolarity,Negative* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5-52549c5~84~ubuntu19.10.1) date 2020-03-02 22:50:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.200000*% 14 | %ADD11C,3.450000*% 15 | %ADD12O,2.100000X1.000000*% 16 | %ADD13O,1.600000X1.000000*% 17 | %ADD14C,0.650000*% 18 | %ADD15C,0.985520*% 19 | %ADD16C,0.988060*% 20 | %ADD17C,0.784860*% 21 | G04 APERTURE END LIST* 22 | D10* 23 | X222671428Y-103103571D02* 24 | X222614285Y-103160714D01* 25 | X222442857Y-103217857D01* 26 | X222328571Y-103217857D01* 27 | X222157142Y-103160714D01* 28 | X222042857Y-103046428D01* 29 | X221985714Y-102932142D01* 30 | X221928571Y-102703571D01* 31 | X221928571Y-102532142D01* 32 | X221985714Y-102303571D01* 33 | X222042857Y-102189285D01* 34 | X222157142Y-102075000D01* 35 | X222328571Y-102017857D01* 36 | X222442857Y-102017857D01* 37 | X222614285Y-102075000D01* 38 | X222671428Y-102132142D01* 39 | D11* 40 | X220800000Y-108400000D03* 41 | D12* 42 | X221465000Y-112630000D03* 43 | X221465000Y-121270000D03* 44 | D13* 45 | X225645000Y-112630000D03* 46 | X225645000Y-121270000D03* 47 | D14* 48 | X221995000Y-119840000D03* 49 | X221995000Y-114060000D03* 50 | D15* 51 | X187010000Y-104934000D03* 52 | X187010000Y-106966000D03* 53 | D16* 54 | X192090000Y-105950000D03* 55 | D17* 56 | X188280000Y-106585000D03* 57 | X188280000Y-105315000D03* 58 | X189550000Y-106585000D03* 59 | X189550000Y-105315000D03* 60 | X190820000Y-106585000D03* 61 | X190820000Y-105315000D03* 62 | M02* 63 | -------------------------------------------------------------------------------- /gerber_silk/scale-F_Paste.gtp: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1* 2 | G04 #@! TF.CreationDate,2020-03-02T22:50:26+01:00* 3 | G04 #@! TF.ProjectId,scale,7363616c-652e-46b6-9963-61645f706362,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Paste,Top* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5-52549c5~84~ubuntu19.10.1) date 2020-03-02 22:50:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | G04 APERTURE END LIST* 14 | M02* 15 | -------------------------------------------------------------------------------- /gerber_silk/scale-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad 5.1.5-52549c5~84~ubuntu19.10.1} date Mo 02 Mär 2020 22:50:28 CET 3 | ; FORMAT={-:-/ absolute / inch / decimal} 4 | ; #@! TF.CreationDate,2020-03-02T22:50:28+01:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.5-52549c5~84~ubuntu19.10.1 6 | ; #@! TF.FileFunction,NonPlated,1,2,NPTH 7 | FMAT,2 8 | INCH 9 | T1C0.0256 10 | T2C0.0388 11 | T3C0.0389 12 | T4C0.1358 13 | % 14 | G90 15 | G05 16 | T1 17 | X8.74Y-4.4906 18 | X8.74Y-4.7181 19 | T2 20 | X7.3626Y-4.1313 21 | X7.3626Y-4.2113 22 | T3 23 | X7.5626Y-4.1713 24 | T4 25 | X8.6929Y-4.2677 26 | T0 27 | M30 28 | -------------------------------------------------------------------------------- /gerber_silk/scale-final.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/gerber_silk/scale-final.zip -------------------------------------------------------------------------------- /images/1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/images/1.jpeg -------------------------------------------------------------------------------- /images/2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/images/2.jpeg -------------------------------------------------------------------------------- /images/3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/lab-balance/aa41c66d59bf7617b5af625244d526914d1f63a7/images/3.jpeg -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | #!/bin/python3.7 2 | import numpy 3 | 4 | tara = 0.0 5 | ref = 100.0 6 | ref_acc = 0.0005 7 | print_res = 10.0 8 | data_range = [0.01,0.1,1.0,10.0,100.0] 9 | 10 | ref_acc_percent = ((ref_acc/ref)*100.0) 11 | 12 | def print_range(i): 13 | print("%.6f" % i,end='') 14 | print('\t\t',end='') 15 | print("%.6f" % ((i*ref_acc_percent)),end='') 16 | print('') 17 | 18 | for j in data_range: 19 | for i in numpy.arange(0.0, j, j/print_res): 20 | print_range(i) 21 | --------------------------------------------------------------------------------