hab ein paar änderungen gemacht

This commit is contained in:
Tobias Kachel 2026-03-20 19:09:23 +01:00
parent d95e3f7923
commit 7e0e37a578
42 changed files with 1801 additions and 2297 deletions

View File

@ -9042,3 +9042,220 @@ Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-17 14:15:47.411 !ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-17 14:15:47.411
!MESSAGE Started RMI Server, listening on port 41337 !MESSAGE Started RMI Server, listening on port 41337
!SESSION 2026-03-18 13:19:26.527 -----------------------------------------------
eclipse.buildId=Version 1.16.0
java.version=17.0.11
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-18 13:19:33.263
!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-18 13:19:33.264
!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml
!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-18 13:19:38.483
!MESSAGE Started RMI Server, listening on port 41337
!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.264
!MESSAGE Unable to connect to repository https://sw-center.st.com/stm32cubeide/openstlinux/updatesite1/compositeContent.xml
!STACK 0
java.net.ConnectException
at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198)
at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56)
at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378)
at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126)
at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93)
at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380)
at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185)
... 21 more
!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.275
!MESSAGE Unable to connect to repository https://sw-center.st.com/stm32cubeide/updatesite1/compositeContent.xml
!STACK 0
java.net.ConnectException
at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198)
at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56)
at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378)
at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126)
at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93)
at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380)
at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185)
... 21 more
!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.285
!MESSAGE Unable to connect to repository https://download.eclipse.org/tools/cdt/releases/latest/compositeContent.xml
!STACK 0
java.net.ConnectException
at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198)
at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56)
at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378)
at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126)
at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93)
at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380)
at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185)
... 21 more
!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.294
!MESSAGE Unable to connect to repository https://download.eclipse.org/releases/2023-12/compositeContent.xml
!STACK 0
java.net.ConnectException
at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198)
at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56)
at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378)
at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126)
at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93)
at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475)
at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380)
at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340)
at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185)
... 21 more
!SESSION 2026-03-18 13:36:38.191 -----------------------------------------------
eclipse.buildId=Version 1.16.0
java.version=17.0.11
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2026-03-18 13:36:40.821
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-18 13:36:44.318
!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-18 13:36:44.319
!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml
!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-18 13:36:49.305
!MESSAGE Started RMI Server, listening on port 41337
!SESSION 2026-03-20 17:42:29.905 -----------------------------------------------
eclipse.buildId=Version 1.16.0
java.version=17.0.11
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2026-03-20 17:42:32.738
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-20 17:42:36.387
!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-20 17:42:36.388
!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml
!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-20 17:42:42.323
!MESSAGE Started RMI Server, listening on port 41337
!SESSION 2026-03-20 18:06:27.774 -----------------------------------------------
eclipse.buildId=Version 1.16.0
java.version=17.0.11
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2026-03-20 18:06:30.631
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-20 18:06:34.323
!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late.
!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-20 18:06:34.324
!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml
!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-20 18:06:39.545
!MESSAGE Started RMI Server, listening on port 41337

View File

@ -309,3 +309,17 @@ Finished building: default.size.stdout
Finished building: task1.list Finished building: task1.list
15:01:24 **** Incremental Build of configuration Debug for project task1 ****
make -j12 all
arm-none-eabi-gcc "../Src/task1.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32G431KBTx -DSTM32 -DSTM32G4 -DNUCLEO_G431KB -c -I../Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Src/task1.d" -MT"Src/task1.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Src/task1.o"
arm-none-eabi-gcc -o "task1.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/task1/STM32G431KBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="task1.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
Finished building target: task1.elf
arm-none-eabi-size task1.elf
arm-none-eabi-objdump -h -S task1.elf > "task1.list"
text data bss dec hex filename
1692 0 1568 3260 cbc task1.elf
Finished building: default.size.stdout
Finished building: task1.list

View File

@ -1,4 +1,4 @@
14:21:35 **** Incremental Build of configuration Debug for project task1 **** 15:01:24 **** Incremental Build of configuration Debug for project task1 ****
make -j12 all make -j12 all
arm-none-eabi-gcc "../Src/task1.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32G431KBTx -DSTM32 -DSTM32G4 -DNUCLEO_G431KB -c -I../Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Src/task1.d" -MT"Src/task1.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Src/task1.o" arm-none-eabi-gcc "../Src/task1.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32G431KBTx -DSTM32 -DSTM32G4 -DNUCLEO_G431KB -c -I../Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Src/task1.d" -MT"Src/task1.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Src/task1.o"
arm-none-eabi-gcc -o "task1.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/task1/STM32G431KBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="task1.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group arm-none-eabi-gcc -o "task1.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/task1/STM32G431KBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="task1.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
@ -13,5 +13,5 @@ Finished building: default.size.stdout
Finished building: task1.list Finished building: task1.list
14:21:36 Build Finished. 0 errors, 0 warnings. (took 332ms) 15:01:24 Build Finished. 0 errors, 0 warnings. (took 330ms)

View File

@ -0,0 +1,36 @@
/*
* sketch.c
*
* Created on: Mar 18, 2026
* Author: tobii
*/
int reihenfolge[6] = {0, 1, 2, 3, 2, 1};
int main(){
while(1){
while(/*schalter gedrückt*/){}
delay();
while(/*schalter losgelassen*/){}
delay();
int aktiv = 1;
while(aktiv){
for(int i; i < reihenfolge.length - 1 && aktiv = 1; i ++){
//alle LED einschalten
if(i = 0){/*alles bis auf LED0 auschalten*/}
if(i = 1){/*..*/}
//...
for(int zähler = 0; zähler < 333 && aktiv == 1; zähler++){
if(/*schalter gerückt*/){
aktiv = 0;
break;
}
else{
delay(1);
}
}
while(/*Taster gedrückt*/){}
}
}
}
}

View File

@ -1,211 +0,0 @@
/* ***************************************************************************************
* Project: task1 - C:GPIO
* File: task1.c
*
* Language: C
*
* Hardware: STefi Light v1.1
* Processor: STM32G431KBT6U
*
* Author: Manuel Lederhofer
* Datum: 10.09.2021
*
* Version: 2.1
* History:
* 10.09.2021 ML create project
* 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U
* 18.02.2025 TK changed projectname to "C: GPIO)
*
* Status: under development
*
* Description:
* Blinks the red LED of STefi Light, currently.
* This file contains the main routine and the initialization.
*
* Notes:
* - MCU speed at startup is 16 MHz
*
* Todo:
* - Change the example code to match the description and requirements
* of the requested application in the lab exercise guide.
*
************************************************************************************** */
/* ------------------------------------ INCLUDES -------------------------------------- */
#include "stm32g431xx.h"
#include "STefi-Light.h"
/* ------------------------------------ DEFINES --------------------------------------- */
#define LOOPS_PER_MS 1244 // NOP-loops for delay()
#define WAITTIME 333
/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */
/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */
int state = 0;
/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */
/* ------------------------------------ PROTOTYPES ------------------------------------ */
static void GPIO_init(void);
static void delay(const uint16_t ms);
/* ------------------------------------ M A I N --------------------------------------- */
int main(void)
{
/* --- initialization --- */
__disable_irq(); // disable interrupts globally
GPIO_init();
__enable_irq(); // enable interrupts globally
/* --- one time tasks --- */
//s0 Hilfvariablen auserhalb von while deklarieren
int running = 0; //0 Lauflicht aus, 1 Lauflicht an
int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung
/* --- infinite processing loop --- */
while (1)
{
int buttonState = GPIOB->IDR & (1 << 0);
// fallende Flanke erkennen
if (lastButtonState && !buttonState)
{
running ^= 1; // toggle running
/* delay(50); // entprellen */
}
lastButtonState = buttonState;
if(running)
{
switch (state)
{
case 0:
state++;
GPIOA->ODR &= ~(1 << 0);
delay(WAITTIME);
GPIOA->ODR |= (1 << 0);
break;
case 1:
state++;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 2:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 3:
state++;
GPIOA->ODR &= ~(1 << 3);
delay(WAITTIME);
GPIOA->ODR |= (1 << 3);
break;
case 4:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 5:
state=0;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 99:
GPIOA->ODR |= MASK_LED_ALL;
while(1){
if((GPIOB->IDR & (1 << 0)) == 0){
state=0;
break;
}
}
}
}
}
//aktuell geht er mit drücken durch die cases
// wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case
return 1;
}
/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */
/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */
/* ------------------------------------------------------------------------------------ *\
* method: static void GPIO_init(void)
*
* Initializes GPIOs on STefi Light for pins with peripherals attached.
*
* requires: - nothing -
* parameters: - none -
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void GPIO_init(void)
{
/* enable port clocks */
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch
/* --- LEDs --- */
GPIOA->ODR |= MASK_LED_ALL;
GPIOA->MODER &= ~(3 << 0);
GPIOA->MODER |= (1 << 0); // set LED pin to output
/* LED1 als Output */
GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so
GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so
/* LED2 als Output */
GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt
GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt
/* LED3 als output */
GPIOA->MODER &= ~(3 << 6);
GPIOA->MODER |= (1 << 6);
/* s0 (PB0) als Input Versuch */
GPIOB->MODER &= ~(3 << 0);
/* Pull-Up Aktivieren Versuch */
GPIOB->PUPDR &= ~(3 << 0);
GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up
}
/* ------------------------------------------------------------------------------------ *\
* method: static void delay(const uint16_t ms)
*
* Realizes a millisecond delay by very bad busy-wait.
*
* requires: - nothing -
* parameters: ms - delay time in milliseconds
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void delay(const uint16_t ms)
{
for (uint16_t i = 0; i < ms; ++i)
{
if((GPIOB->IDR & (1 << 0)) == 0){
state = 99;
break;
}
for (uint16_t j = 0; j < LOOPS_PER_MS; ++j)
{
__asm("NOP");
}
}
}
/* ************************************ E O F ***************************************** */

View File

@ -1,212 +0,0 @@
/* ***************************************************************************************
* Project: task1 - C:GPIO
* File: task1.c
*
* Language: C
*
* Hardware: STefi Light v1.1
* Processor: STM32G431KBT6U
*
* Author: Manuel Lederhofer
* Datum: 10.09.2021
*
* Version: 2.1
* History:
* 10.09.2021 ML create project
* 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U
* 18.02.2025 TK changed projectname to "C: GPIO)
*
* Status: under development
*
* Description:
* Blinks the red LED of STefi Light, currently.
* This file contains the main routine and the initialization.
*
* Notes:
* - MCU speed at startup is 16 MHz
*
* Todo:
* - Change the example code to match the description and requirements
* of the requested application in the lab exercise guide.
*
************************************************************************************** */
/* ------------------------------------ INCLUDES -------------------------------------- */
#include "stm32g431xx.h"
#include "STefi-Light.h"
/* ------------------------------------ DEFINES --------------------------------------- */
#define LOOPS_PER_MS 1244 // NOP-loops for delay()
#define WAITTIME 333
/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */
/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */
int state = 0;
/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */
/* ------------------------------------ PROTOTYPES ------------------------------------ */
static void GPIO_init(void);
static void delay(const uint16_t ms);
/* ------------------------------------ M A I N --------------------------------------- */
int main(void)
{
/* --- initialization --- */
__disable_irq(); // disable interrupts globally
GPIO_init();
__enable_irq(); // enable interrupts globally
/* --- one time tasks --- */
//s0 Hilfvariablen auserhalb von while deklarieren
int running = 0; //0 Lauflicht aus, 1 Lauflicht an
int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung
/* --- infinite processing loop --- */
while (1)
{
int buttonState = GPIOB->IDR & (1 << 0);
// fallende Flanke erkennen
if (lastButtonState && !buttonState)
{
running ^= 1; // toggle running
/* delay(50); // entprellen */
}
lastButtonState = buttonState;
if(running)
{
switch (state)
{
case 0:
state++;
GPIOA->ODR &= ~(1 << 0);
delay(WAITTIME);
GPIOA->ODR |= (1 << 0);
break;
case 1:
state++;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 2:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 3:
state++;
GPIOA->ODR &= ~(1 << 3);
delay(WAITTIME);
GPIOA->ODR |= (1 << 3);
break;
case 4:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 5:
state=0;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 99:
GPIOA->ODR |= MASK_LED_ALL;
while(1){
if((GPIOB->IDR & (1 << 0)) == 0){
delay(10);
state=0;
break;
}
}
}
}
}
//aktuell geht er mit drücken durch die cases
// wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case
return 1;
}
/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */
/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */
/* ------------------------------------------------------------------------------------ *\
* method: static void GPIO_init(void)
*
* Initializes GPIOs on STefi Light for pins with peripherals attached.
*
* requires: - nothing -
* parameters: - none -
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void GPIO_init(void)
{
/* enable port clocks */
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch
/* --- LEDs --- */
GPIOA->ODR |= MASK_LED_ALL;
GPIOA->MODER &= ~(3 << 0);
GPIOA->MODER |= (1 << 0); // set LED pin to output
/* LED1 als Output */
GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so
GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so
/* LED2 als Output */
GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt
GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt
/* LED3 als output */
GPIOA->MODER &= ~(3 << 6);
GPIOA->MODER |= (1 << 6);
/* s0 (PB0) als Input Versuch */
GPIOB->MODER &= ~(3 << 0);
/* Pull-Up Aktivieren Versuch */
GPIOB->PUPDR &= ~(3 << 0);
GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up
}
/* ------------------------------------------------------------------------------------ *\
* method: static void delay(const uint16_t ms)
*
* Realizes a millisecond delay by very bad busy-wait.
*
* requires: - nothing -
* parameters: ms - delay time in milliseconds
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void delay(const uint16_t ms)
{
for (uint16_t i = 0; i < ms; ++i)
{
if((GPIOB->IDR & (1 << 0) && state != 99) == 0){
state = 99;
break;
}
for (uint16_t j = 0; j < LOOPS_PER_MS; ++j)
{
__asm("NOP");
}
}
}
/* ************************************ E O F ***************************************** */

View File

@ -1,212 +0,0 @@
/* ***************************************************************************************
* Project: task1 - C:GPIO
* File: task1.c
*
* Language: C
*
* Hardware: STefi Light v1.1
* Processor: STM32G431KBT6U
*
* Author: Manuel Lederhofer
* Datum: 10.09.2021
*
* Version: 2.1
* History:
* 10.09.2021 ML create project
* 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U
* 18.02.2025 TK changed projectname to "C: GPIO)
*
* Status: under development
*
* Description:
* Blinks the red LED of STefi Light, currently.
* This file contains the main routine and the initialization.
*
* Notes:
* - MCU speed at startup is 16 MHz
*
* Todo:
* - Change the example code to match the description and requirements
* of the requested application in the lab exercise guide.
*
************************************************************************************** */
/* ------------------------------------ INCLUDES -------------------------------------- */
#include "stm32g431xx.h"
#include "STefi-Light.h"
/* ------------------------------------ DEFINES --------------------------------------- */
#define LOOPS_PER_MS 1244 // NOP-loops for delay()
#define WAITTIME 333
/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */
/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */
int state = 0;
/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */
/* ------------------------------------ PROTOTYPES ------------------------------------ */
static void GPIO_init(void);
static void delay(const uint16_t ms);
/* ------------------------------------ M A I N --------------------------------------- */
int main(void)
{
/* --- initialization --- */
__disable_irq(); // disable interrupts globally
GPIO_init();
__enable_irq(); // enable interrupts globally
/* --- one time tasks --- */
//s0 Hilfvariablen auserhalb von while deklarieren
int running = 0; //0 Lauflicht aus, 1 Lauflicht an
int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung
/* --- infinite processing loop --- */
while (1)
{
int buttonState = GPIOB->IDR & (1 << 0);
// fallende Flanke erkennen
if (lastButtonState && !buttonState)
{
running ^= 1; // toggle running
/* delay(50); // entprellen */
}
lastButtonState = buttonState;
if(running)
{
switch (state)
{
case 0:
state++;
GPIOA->ODR &= ~(1 << 0);
delay(WAITTIME);
GPIOA->ODR |= (1 << 0);
break;
case 1:
state++;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 2:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 3:
state++;
GPIOA->ODR &= ~(1 << 3);
delay(WAITTIME);
GPIOA->ODR |= (1 << 3);
break;
case 4:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 5:
state=0;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 99:
GPIOA->ODR |= MASK_LED_ALL;
while(1){
if((GPIOB->IDR & (1 << 0)) == 0){
//delay(10);
state=0;
break;
}
}
}
}
}
//aktuell geht er mit drücken durch die cases
// wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case
return 1;
}
/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */
/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */
/* ------------------------------------------------------------------------------------ *\
* method: static void GPIO_init(void)
*
* Initializes GPIOs on STefi Light for pins with peripherals attached.
*
* requires: - nothing -
* parameters: - none -
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void GPIO_init(void)
{
/* enable port clocks */
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch
/* --- LEDs --- */
GPIOA->ODR |= MASK_LED_ALL;
GPIOA->MODER &= ~(3 << 0);
GPIOA->MODER |= (1 << 0); // set LED pin to output
/* LED1 als Output */
GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so
GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so
/* LED2 als Output */
GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt
GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt
/* LED3 als output */
GPIOA->MODER &= ~(3 << 6);
GPIOA->MODER |= (1 << 6);
/* s0 (PB0) als Input Versuch */
GPIOB->MODER &= ~(3 << 0);
/* Pull-Up Aktivieren Versuch */
GPIOB->PUPDR &= ~(3 << 0);
GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up
}
/* ------------------------------------------------------------------------------------ *\
* method: static void delay(const uint16_t ms)
*
* Realizes a millisecond delay by very bad busy-wait.
*
* requires: - nothing -
* parameters: ms - delay time in milliseconds
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void delay(const uint16_t ms)
{
for (uint16_t i = 0; i < ms; ++i)
{
if((GPIOB->IDR & (1 << 0) && state != 99) == 0){
state = 99;
break;
}
for (uint16_t j = 0; j < LOOPS_PER_MS; ++j)
{
__asm("NOP");
}
}
}
/* ************************************ E O F ***************************************** */

View File

@ -1,212 +0,0 @@
/* ***************************************************************************************
* Project: task1 - C:GPIO
* File: task1.c
*
* Language: C
*
* Hardware: STefi Light v1.1
* Processor: STM32G431KBT6U
*
* Author: Manuel Lederhofer
* Datum: 10.09.2021
*
* Version: 2.1
* History:
* 10.09.2021 ML create project
* 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U
* 18.02.2025 TK changed projectname to "C: GPIO)
*
* Status: under development
*
* Description:
* Blinks the red LED of STefi Light, currently.
* This file contains the main routine and the initialization.
*
* Notes:
* - MCU speed at startup is 16 MHz
*
* Todo:
* - Change the example code to match the description and requirements
* of the requested application in the lab exercise guide.
*
************************************************************************************** */
/* ------------------------------------ INCLUDES -------------------------------------- */
#include "stm32g431xx.h"
#include "STefi-Light.h"
/* ------------------------------------ DEFINES --------------------------------------- */
#define LOOPS_PER_MS 1244 // NOP-loops for delay()
#define WAITTIME 333
/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */
/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */
int state = 0;
/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */
/* ------------------------------------ PROTOTYPES ------------------------------------ */
static void GPIO_init(void);
static void delay(const uint16_t ms);
/* ------------------------------------ M A I N --------------------------------------- */
int main(void)
{
/* --- initialization --- */
__disable_irq(); // disable interrupts globally
GPIO_init();
__enable_irq(); // enable interrupts globally
/* --- one time tasks --- */
//s0 Hilfvariablen auserhalb von while deklarieren
int running = 0; //0 Lauflicht aus, 1 Lauflicht an
int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung
/* --- infinite processing loop --- */
while (1)
{
int buttonState = GPIOB->IDR & (1 << 0);
// fallende Flanke erkennen
if (lastButtonState && !buttonState)
{
running ^= 1; // toggle running
/* delay(50); // entprellen */
}
lastButtonState = buttonState;
if(running)
{
switch (state)
{
case 0:
state++;
GPIOA->ODR &= ~(1 << 0);
delay(WAITTIME);
GPIOA->ODR |= (1 << 0);
break;
case 1:
state++;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 2:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 3:
state++;
GPIOA->ODR &= ~(1 << 3);
delay(WAITTIME);
GPIOA->ODR |= (1 << 3);
break;
case 4:
state++;
GPIOA->ODR &= ~(1 << 2);
delay(WAITTIME);
GPIOA->ODR |= (1 << 2);
break;
case 5:
state=0;
GPIOA->ODR &= ~(1 << 1);
delay(WAITTIME);
GPIOA->ODR |= (1 << 1);
break;
case 99:
GPIOA->ODR |= MASK_LED_ALL;
while(1){
if((GPIOB->IDR & (1 << 0)) == 0){
delay(10);
state=0;
break;
}
}
}
}
}
//aktuell geht er mit drücken durch die cases
// wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case
return 1;
}
/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */
/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */
/* ------------------------------------------------------------------------------------ *\
* method: static void GPIO_init(void)
*
* Initializes GPIOs on STefi Light for pins with peripherals attached.
*
* requires: - nothing -
* parameters: - none -
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void GPIO_init(void)
{
/* enable port clocks */
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch
/* --- LEDs --- */
GPIOA->ODR |= MASK_LED_ALL;
GPIOA->MODER &= ~(3 << 0);
GPIOA->MODER |= (1 << 0); // set LED pin to output
/* LED1 als Output */
GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so
GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so
/* LED2 als Output */
GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt
GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt
/* LED3 als output */
GPIOA->MODER &= ~(3 << 6);
GPIOA->MODER |= (1 << 6);
/* s0 (PB0) als Input Versuch */
GPIOB->MODER &= ~(3 << 0);
/* Pull-Up Aktivieren Versuch */
GPIOB->PUPDR &= ~(3 << 0);
GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up
}
/* ------------------------------------------------------------------------------------ *\
* method: static void delay(const uint16_t ms)
*
* Realizes a millisecond delay by very bad busy-wait.
*
* requires: - nothing -
* parameters: ms - delay time in milliseconds
* returns: - nothing -
\* ------------------------------------------------------------------------------------ */
static void delay(const uint16_t ms)
{
for (uint16_t i = 0; i < ms; ++i)
{
if((GPIOB->IDR & (1 << 0)) == 0){
state = 99;
break;
}
for (uint16_t j = 0; j < LOOPS_PER_MS; ++j)
{
__asm("NOP");
}
}
}
/* ************************************ E O F ***************************************** */

View File

@ -0,0 +1,8 @@
/*
* sketch.c
*
* Created on: Mar 18, 2026
* Author: tobii
*/

View File

@ -125,7 +125,7 @@ int main(void)
GPIOA->ODR |= MASK_LED_ALL; GPIOA->ODR |= MASK_LED_ALL;
while(1){ while(1){
if((GPIOB->IDR & (1 << 0)) == 0){ if((GPIOB->IDR & (1 << 0)) == 0){
delay(10); delay(150);
state=0; state=0;
break; break;
} }

View File

@ -0,0 +1,24 @@
/*
* sketch.c
*
* Created on: Mar 18, 2026
* Author: tobii
*/
int reihenfolge[6] = {0, 1, 2, 3, 2, 1};
int main(){
while(1){
while(/*schalter gedrückt*/){}
delay();
while(/*schalter losgelassen*/){}
delay();
int aktiv = 1;
while(aktiv){
for(int i; i < reihenfolge.length - 1; i ++){
//alle LED einschalten
if(i = 0)
}
}
}
}

Binary file not shown.

View File

@ -1,6 +1,6 @@
IMPORT_FILES_AND_FOLDERS_RELATIVE=true IMPORT_FILES_AND_FOLDERS_RELATIVE=true
IMPORT_FILES_AND_FOLDERS_TYPE=23,1 IMPORT_FILES_AND_FOLDERS_TYPE=23,1
eclipse.preferences.version=1 eclipse.preferences.version=1
platformState=1772304866315 platformState=1772304866316
quickStart=false quickStart=false
tipsAndTricks=true tipsAndTricks=true

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
#Tue Mar 17 14:15:39 CET 2026 #Fri Mar 20 18:06:30 CET 2026
org.eclipse.core.runtime=2 org.eclipse.core.runtime=2
org.eclipse.platform=4.30.0.v20231201-0110 org.eclipse.platform=4.30.0.v20231201-0110

View File

@ -13,7 +13,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="422947886521367905" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1558684269450950684" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>

Binary file not shown.

Binary file not shown.

View File

@ -333,8 +333,8 @@ __STATIC_FORCEINLINE void __disable_irq(void)
80003d8: f003 0301 and.w r3, r3, #1 80003d8: f003 0301 and.w r3, r3, #1
80003dc: 2b00 cmp r3, #0 80003dc: 2b00 cmp r3, #0
80003de: d1f9 bne.n 80003d4 <main+0x1bc> 80003de: d1f9 bne.n 80003d4 <main+0x1bc>
delay(20); delay(150);
80003e0: 2014 movs r0, #20 80003e0: 2096 movs r0, #150 @ 0x96
80003e2: f000 f87b bl 80004dc <delay> 80003e2: f000 f87b bl 80004dc <delay>
state=0; state=0;
80003e6: 4b03 ldr r3, [pc, #12] @ (80003f4 <main+0x1dc>) 80003e6: 4b03 ldr r3, [pc, #12] @ (80003f4 <main+0x1dc>)

36
task1/Src/sketch.c Normal file
View File

@ -0,0 +1,36 @@
/*
* sketch.c
*
* Created on: Mar 18, 2026
* Author: tobii
*/
int reihenfolge[6] = {0, 1, 2, 3, 2, 1};
int main(){
while(1){
while(/*schalter nicht gedrückt*/){}
delay(10);
while(/*schalter losgelassen*/){}
delay(150);
int aktiv = 1;
while(aktiv){
for(int i; i < reihenfolge.length - 1 && aktiv = 1; i ++){
//alle LED einschalten
if(i = 0){/*alles bis auf LED0 auschalten*/}
if(i = 1){/*..*/}
//...
for(int zähler = 0; zähler < 333 && aktiv == 1; zähler++){
if(/*schalter gerückt*/){
aktiv = 0;
break;
}
else{
delay(1);
}
}
while(/*Taster gedrückt*/){}
}
}
}
}

View File

@ -125,7 +125,7 @@ int main(void)
GPIOA->ODR |= MASK_LED_ALL; GPIOA->ODR |= MASK_LED_ALL;
while(1){ while(1){
if((GPIOB->IDR & (1 << 0)) == 0){ if((GPIOB->IDR & (1 << 0)) == 0){
delay(20); delay(150);
state=0; state=0;
break; break;
} }
@ -166,7 +166,7 @@ GPIOA->MODER &= ~(3 << 0);
GPIOA->MODER |= (1 << 0); // set LED pin to output GPIOA->MODER |= (1 << 0); // set LED pin to output
/* LED1 als Output */ /* LED1 als Output */
GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so GPIOA->MODER &= ~(3 ^<< 2); // Versuch: LED 1 Mode löschen :klappt so
GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so
/* LED2 als Output */ /* LED2 als Output */

View File

@ -14,7 +14,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="422947886521367905" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1558684269450950684" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>

View File

@ -13,7 +13,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="422947886521367905" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1558684269450950684" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>

View File

@ -13,7 +13,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="422947886521367905" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1558684269450950684" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>