We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all, Due to my chip's unique memory structure, I use a tool to combine the seperate binary file of each bank to a big binary file. We have 4 banks. Now we have two problems: 1) If bank 0 is empty (no code at all) the program doesn't run at all. 2) If bank 0 is not empty, when functions in bank 1 is called, it will run the code in bank 0 (rather than bank 1). I checked the bank-switching code in my project, and it's ok.
You have left out all the fine details that would have been strictly necessary for anyone to help you with this. As it stands, all you're actually saying here is that "my bank switching code doesn't actually work, even though I'm convinced it should." That's not giving people much to work with. Things you must check: 1) What is the power-up default state of your bank switcher? If it's bank zero, as it should be, then it's no surprise at all that you don't get anything to run if you don't put any code in bank zero --- the micro then wouldn't have any code at all to run, including no access to the bank switching routines, either. 2) What is that unique memory structure of yours, anyway? 3) Are you sure your bank switcher actually switches banks? Have you verified by looking at the relevant address / chip-select lines on a scope?
1) If bank 0 is empty (no code at all) the program doesn't run at all. How can it without a start vector? Erik