Go to advanced search

by Nabushika
Sun Jun 16, 2019 5:48 pm
Forum: Bare metal, Assembly language
Topic: Unexpected behaviour of arrays and switch statements
Replies: 10
Views: 818

Re: Unexpected behaviour of arrays and switch statements

Most likely your linker file isn't saving the rodata section which is the one the constant data will go into, so basically your file doesn't actually contain the constant array and is printing junk. Without changing the linker file try putting the array in the text section ... something like int __...

Go to advanced search