dodano w komentarzu instrukcje dla debugera do odczytu VALUE Timera w sposob proceduralny, strukturalny i obiektowy

This commit is contained in:
mpabi 2024-06-18 09:26:39 +00:00
parent abb78d3fc6
commit 1f0ce9a26b
1 changed files with 25 additions and 1 deletions

View File

@ -12,6 +12,8 @@
#include <stdint.h>
#include "murax.h"
#include <cstddef>
void print(const char*str){
while(*str){
@ -26,6 +28,9 @@ void println(const char*str){
volatile int mati = 0;
// p/x *(uint32_t *)0xf0020048
// p/x ((Timer_Reg *)0xf0020040)->VALUE
// p/x TimeR::ptr->VALUE
// Modern C++ aproach
// ---
@ -43,6 +48,22 @@ private:
const Timer_Reg* TimeR::ptr = reinterpret_cast<const Timer_Reg*>(0xF0020040);
// ---
/*
int len( const char * str) {
int32_t i = 0;
while (*str!=0) {
++i;
++str;
};
return i;
}
*/
int32_t ile = 0;
int main() {
// println("hello world arty a7 v1");
@ -62,7 +83,10 @@ int main() {
// Thread 0
while( 1){
++mati;
char * s = "11111111112222222222";
++ile;
// len (s);
}
}