Compiling program in C #342
Unanswered
carlesureta
asked this question in
Q&A
Replies: 1 comment 12 replies
-
The program from your ZIP file (main.c): int main() {
int vector[128];
for (int i = 0; i < 128; i++) {
vector[i] = i +1;
}
return 0;
} The "problem" here is that the compiler removes all of the code due to optimization. You need some kind of input/output or your have to make the compiler keep your code for example by using Btw, do you want to simulate your program (and look at waveforms) or do you want to run in on real hardware? |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, so I am trying again to write a very simple code, that accesses memory, and I thought of accessing a vector of 128 integers. The thing is that when I compile the code, the asm file, and thus the application_image, is wrong. You can see no instructions in the main section of the file main.asm.
main.zip
Beta Was this translation helpful? Give feedback.
All reactions