Commit Graph

12 Commits

Author SHA1 Message Date
69861846a2 Added the linker error playground
Here is a project where I was just trying to figure out the nuances of
different Translation Units and the scope of variables and function.

TLDR: run gcc d.c b.c c.c and see that the linker errors

There is storage duration and linkage that can be specified for vars and
funtions.

There are four different types of Storage Duration
Automatic - which is get initialized when the block starts and dies when
the block ends
Static - which is the entire duration of the program
Thread - which i didn't get into really
Allocated - which is the typical heap allocation thingys

There are three types of linkage. Basically where can you reach a
varibale from
No Linkage - can only be refered to in the block
Internal Linkage - can only be refered to in the same TLU
External Linkage - can be reachable by any TLU in the program

This shows how defining a variable in 1 h file (a.h), which will have
external linkage because it is a file scope variables not declared
static will default to, and then #include-ing the h file in multiple
other files will lead to redefiniation exceptions thrown by the linker.

If confused see more here:
https://en.cppreference.com/w/c/language/storage_class_specifiers.html
2025-12-19 13:06:31 -08:00
0c834ca675 Added pic project for 101 2024-10-24 15:18:43 -07:00
17fadb5151 Added matrix calcs and time_tests 2024-10-07 18:16:21 -07:00
ba52c3baed Add Reference design notes for salinity 2024-06-11 21:15:30 -07:00
eb4ffb54cb Add c_projects 2024-04-18 12:33:14 -07:00
e92aa147fa Added pics from pulsar circuit driven by teensy 2024-04-17 13:08:41 -07:00
a072c91c81 Added graph 2024-03-25 19:28:45 -07:00
0c55235596 Added readme to epoxy_transducer 2024-03-25 19:23:09 -07:00
1a48e961bb Added piecewise snippet 2024-03-22 18:06:25 -07:00
8ebc6a36bc Added scope fft snippet
Used to compare the fft of signals taken from the DSOX2024A oscope
2024-03-21 10:54:10 -07:00
02512129e2 Added time of flight data analysis script
Used to compare expected time of flight to measured when using epoxyed desoldered hc-sr04 ultrasonic transducers.
2024-03-21 10:53:11 -07:00
a0bfb24a57 Initial commit 2024-03-21 17:42:07 +00:00