commit 80a0f2eb15ad6ecb3add5a2feda91c6592129236 Author: Schrom01 Date: Thu Nov 3 13:33:48 2022 +0100 initial commmit diff --git a/CTP_ControlStructures_en.pdf b/CTP_ControlStructures_en.pdf new file mode 100644 index 0000000..233e8f3 Binary files /dev/null and b/CTP_ControlStructures_en.pdf differ diff --git a/code/Lab.uvoptx b/code/Lab.uvoptx new file mode 100644 index 0000000..f5cb189 --- /dev/null +++ b/code/Lab.uvoptx @@ -0,0 +1,228 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc; *.md + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + Target 1 + 0x4 + ARM-ADS + + 180000000 + + 1 + 1 + 0 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\build\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 18 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 6 + + + + + + + + + + + STLink\ST-LINKIII-KEIL_SWO.dll + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + (105=-1,-1,-1,-1,0) + + + 0 + ST-LINKIII-KEIL_SWO + -U-O206 -O206 -S3 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:CT_Board_HS14_M0$Flash\STM32F4xx_2048.FLM) + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_2048 -FS08000000 -FL0200000 -FP0($$Device:CT_Board_HS14_M0$Flash\STM32F4xx_2048.FLM)) + + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + app + 1 + 0 + 0 + 0 + + 1 + 1 + 2 + 0 + 0 + 0 + .\app\main.s + main.s + 0 + 0 + + + + + ::Device + 1 + 0 + 0 + 1 + + + + ::HAL + 0 + 0 + 0 + 1 + + +
diff --git a/code/Lab.uvprojx b/code/Lab.uvprojx new file mode 100644 index 0000000..40b9584 --- /dev/null +++ b/code/Lab.uvprojx @@ -0,0 +1,519 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + Target 1 + 0x4 + ARM-ADS + 6180000::V6.18::ARMCLANG + 6180000::V6.18::ARMCLANG + 1 + + + CT_Board_HS14_M0 + STMicroelectronics + InES.CTBoard14_DFP.4.0.2 + https://ennis.zhaw.ch/pack/ + IROM(0x08000000,0x200000) IRAM(0x20000000,0x30000) IRAM2(0x10000000,0x10000) CPUTYPE("Cortex-M0") CLOCK(180000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_2048 -FS08000000 -FL0200000 -FP0($$Device:CT_Board_HS14_M0$Flash\STM32F4xx_2048.FLM)) + 0 + + + + + + + + + + + $$Device:CT_Board_HS14_M0$SVD\STM32F429x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\build\ + Lab + 1 + 0 + 0 + 1 + 1 + .\build\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -MPU + DARMCM1.DLL + -pCM0 + SARMCM3.DLL + -MPU + TARMCM1.DLL + -pCM0 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + -1 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M0" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x30000 + + + 1 + 0x8000000 + 0x200000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x200000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x30000 + + + 0 + 0x10000000 + 0x10000 + + + + + + 1 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + --diag_suppress 6314 + + + + + + + + app + + + main.s + 2 + .\app\main.s + + + + + ::Device + + + ::HAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\Device\CT_Board_HS14_M0\datainit_ctboard.s + + + + + + + + RTE\Device\CT_Board_HS14_M0\startup_ctboard.s + + + + + + + + RTE\Device\CT_Board_HS14_M0\system_ctboard.c + + + + + + + + RTE\HAL\CT_Board_HS14_M0\hal_fmc.c + + + + + + + + RTE\HAL\CT_Board_HS14_M0\hal_gpio.c + + + + + + + + RTE\HAL\CT_Board_HS14_M0\hal_pwr.c + + + + + + + + RTE\HAL\CT_Board_HS14_M0\hal_rcc.c + + + + + + + + + + + + + <Project Info> + 0 + 1 + + + + +
diff --git a/code/app/main.s b/code/app/main.s new file mode 100644 index 0000000..78cd6ae --- /dev/null +++ b/code/app/main.s @@ -0,0 +1,100 @@ +;* ------------------------------------------------------------------ +;* -- _____ ______ _____ - +;* -- |_ _| | ____|/ ____| - +;* -- | | _ __ | |__ | (___ Institute of Embedded Systems - +;* -- | | | '_ \| __| \___ \ Zurich University of - +;* -- _| |_| | | | |____ ____) | Applied Sciences - +;* -- |_____|_| |_|______|_____/ 8401 Winterthur, Switzerland - +;* ------------------------------------------------------------------ +;* -- +;* -- Project : CT1 - Lab 7 +;* -- Description : Control structures +;* -- +;* -- $Id: main.s 3748 2016-10-31 13:26:44Z kesr $ +;* ------------------------------------------------------------------ + + +; ------------------------------------------------------------------- +; -- Constants +; ------------------------------------------------------------------- + + AREA myCode, CODE, READONLY + + THUMB + +ADDR_LED_15_0 EQU 0x60000100 +ADDR_LED_31_16 EQU 0x60000102 +ADDR_7_SEG_BIN_DS1_0 EQU 0x60000114 +ADDR_DIP_SWITCH_15_0 EQU 0x60000200 +ADDR_HEX_SWITCH EQU 0x60000211 + +NR_CASES EQU 0xB + +jump_table ; ordered table containing the labels of all cases + ; STUDENTS: To be programmed + + + ; END: To be programmed + + +; ------------------------------------------------------------------- +; -- Main +; ------------------------------------------------------------------- + +main PROC + EXPORT main + +read_dipsw ; Read operands into R0 and R1 and display on LEDs + ; STUDENTS: To be programmed + + + ; END: To be programmed + +read_hexsw ; Read operation into R2 and display on 7seg. + ; STUDENTS: To be programmed + + + ; END: To be programmed + +case_switch ; Implement switch statement as shown on lecture slide + ; STUDENTS: To be programmed + + + ; END: To be programmed + + +; Add the code for the individual cases below +; - operand 1 in R0 +; - operand 2 in R1 +; - result in R0 + +case_dark + LDR R0, =0 + B display_result + +case_add + ADDS R0, R0, R1 + B display_result + +; STUDENTS: To be programmed + + +; END: To be programmed + + +display_result ; Display result on LEDs + ; STUDENTS: To be programmed + + + ; END: To be programmed + + B read_dipsw + + ALIGN + ENDP + +; ------------------------------------------------------------------- +; -- End of file +; ------------------------------------------------------------------- + END +