So close yet so far...
Hardware: TI AM1707 EVM - ARM926EJ-S microprocessor (not MCU, so not officially supported in the device database)
Debugger: Segger J-Link
Application: GNU compiler toolchain + working LED code
When loaded with J-Link + GDB, the LEDs light up correctly
When loaded by J-Link + uVision, the debugger SEEMS to give me access to the board, but the application doesn't run correctly (starts near 0xFFFF0000, which is on-chip local ram)...
Am I missing something totally basic here? Any help would be greatly appreciated!!
-Jonathan
A bit of progress, viewing the disassembly:
When the debugger first loads, PC=0xFFFF0000.
Next, force program counter to my application's entry address (0xC108010C) - opcodes here are random and incorrect, regardless of "Load Application at Startup" - if the Command "LOAD D:\led.elf" is issued, opcodes become all zero - "arm-none-eabi-objcopy -O ihex led.elf led.hex" + "LOAD D:\led.hex": nonzero opcodes, but still incorrect?
So at least the problem is narrowed down to uVision not being able to load the application correctly into memory - probably an incorrect application output format? But not sure how to fix...
Project Options > Output > Generate Hex File Project Options > Debug > Load Application at Startup
hex file is identical to what i generate manually via arm-none-eabi-objcopy -O ihex
through the magic of uVision, however, now the opcodes seem to be loaded at the correct addresses in memory
PC still starts incorrectly at 0xFFFF0000 (start of ARM local RAM)
if i force PC to 0xC1080000 (new forced address of my application entry point), code seems to run along until it's time to jump to my C startup function, and then it jumps inexplicably to some address in the middle of nowhere (0x42E7FF9C, which for my SoC is not even on the memory map)
Correction, led.hex has to be manually loaded using "LOAD build\led.hex"
i don't know what's going on now, but then again i never did..
ok, previously opcodes were corrupted due to my confused testing
the command "load build\led.hex" had to be issued manually and then set PC to 0xc1080000. maybe this can be done in the initialization script? in any case my blinky example is up and running now
is this really the normal workflow for this $5000 compiler?? gdb is starting to look more and more bang for the buck
NO, confound it, it is not. I may very well be 0xFFFF0000 (start of ACMEC3KLQ local RAM)
memory mapping is chip dependent
Erik
is this really the normal workflow for this $5000 compiler??
no, it is not, I, and all I know, do not have any such problems.
Bring up the IDE, load the project [change device} [change debugger settings] and GO
had to be issued manually and then set PC to 0xc1080000 sounds as if you have selected the wrong device.
Dear Erik Malund:
Thank for your replies, and I would like to congratulate you that you do not have such problems. Unfortunately, (1) my issue has already been resolved, and (2) even if it had not, your comments would not have helped me to resolve it.
It has also been helpful to gauge the professionalism of the Keil user community to assist in the toolchain selection process.
For readers more intelligent than Erik:
Since I am using an MPU (TI AM1707) which is not supported by MDK-ARM, my Device is ARM > ARM9E-S (Little Endian). This is not a microcontroller, so several other little fixes were required to get the $$$$ toolchain to work corectly, but they are not worth listing here. Due to management decisions, I am stuck working with MDK-ARM instead of DS-5.
Now, as far as I can tell (remember, my project is compiled with GCC):
Several other little fixes were required to get the $$$$ toolchain to work corectly, but they are not worth listing here. Setting PC by hand and loading the intel hex file seems to be the only way to debug a program onto my board, although I would be love to be proven wrong by some facts or constructive suggestions instead of random puerile vitriol.
These latter two steps can indeed be placed in an Initialization File as mentioned above (oh, I'm so sorry, Erik, do you not know what that is? Poor boy, go back to your computer and click GO some more to feel better...), so all you have to do is press Ctrl+F5, VC6-style, then F5 to run (oh, I'm so sorry, Erik, those are called keyboard shortcuts; don't worry, those are for grown-ups).
Yours sincerely, Jonathan
P.S. Yes, that's right, memory maps are device-independent! Good job, Erik! You're such a clever boy. Now go back to happy little world clicking GO and let real engineers worry about what happens when the fancy IDE your free-spending supervisor bought for you doesn't support your chip.
P.P.S. I mean, honestly, if you are going to be an unhelpful ***, why bother posting at all? This is a technical forum, not 4chan
@Jonathan Chen,
What potty mouth you have !
It might be wise for you to stick around the forum for a while before judging the contributors too much.
There are a fair few who have got a considerable amount of experience and are willing to share the knowledge gained through that experience.
Erik is one of them.
@Silly Sausage Thanks for some words of reason, the first I've seen...But to be fair, I've yet to learn anything technical from this disorganized and hard to search forum.
@Per Westermark,@Tamir Michael You've really blown Silly Sausage's case.
So in any case, I do believe this is my final post to this unmoderated and utterly unhelpful forum. @Keil Thanks for hosting!
Well consider this: - we - as end users - can't know what may be wrong in your project files.
- the money your company spent on the Keil license gives you access to Keil support. They can help figuring out what is wrong with your project.
- if asking for help on an end-user forum, it is totally reckless to blame people who do answer. Even if the forum doesn't have any ignore function, you are writing in huge capital letters "Ignore me. I am not a person worth spending time helping."
- threatening to leave a forum is really not a mature route to go. If you first try to make people angry and then threaten to leave, you will only make people clap their hands.
- threatening to leave a forum is also quite counterproductive, since it only guanrantees that you can't get any help. And quite a number of people have received quite a lot of help on this forum, whatever you decide to believe. If you want to prove me wrong - make a summary over the last 1000 threads... When you have filtered out the "help me cheat on my school work", the number of people who have received good help are quite significant.
- if you want skilled help from a professional, it helps if you show up behaving like a professional. If going into tantrums, you don't get any help. Which isn't proof that the forum isn't helpful.
- professional, payed-for support is given to everyone entitled to it. When asking for help on a public forum on the other hand, the old adage about earning trust/respect/... will still hold true. People with good social skills will receive many times more help than people lacking social skills. May be seen as unfair, but that is how life is. People don't spend time on someone who tries to bite.
- this forum is very well regarded by Google. So the forum threads ends up very high when searching. How do you want to show up on Google searches? As a grumpy person with tantrums? Or as a skilled and mature developer? Maybe you should let one of your friends review this thread. If they are honest, they will tell you that the outcome of that post of yours was nowhere near what you may think. Erik had not written anything warranting that post. The signals sent out by that post was not about professionalism. But about lack of maturity.
You know, I went back and actually bothered to read your posts and realized you don't need technical advice anymore and your issue is resolved. You actually wrote a long and detailed post filled with technical information that might help future readers that are in a similar situation, but since the threads on this board are so poorly organized, that'll probably never happen.. In this thread, you're the only person contributing non-trivial technical information, and I applaud that.
I read more closely and found that you were not "threatening to leave" the forum, you were leaving the forum, and I completely understand how you feel. If I had posted some questions, worked it out the answer myself, and shared it with the forum, only to be flamed by "no, confound it you stoopid n00b", I'd never post again either. I mean, why contribute to a community like that? The whole point is to contribute knowledge to a shared pool, however poorly organized!
This place makes TI's professionally hosted forums seem that much more incredible, and I highly encourage any TI users in this forum to migrate to e2e.ti.com, which is much better organized, easier to search, and professional. This forum doesn't require login or even have terms of service beyond "other customers will reply to you", and the potential for abuse ridiculously high.
Since you mentioned "selection process", you are probably still trying out the free evaluation version of MDK and hence Keil technical support is not available to you, so I apologize for inconsiderately suggesting something as obvious as "go submit a support ticket".
I guess I really need to work on my basic reading skills, but at least I don't post stupid stuff like Tamir "What potty mouth you have" Michael.
On behalf of all Keil end users, I'd like to apologize for the immature people that populate and troll this forum, and for my first two posts.
Yes, it's a deficiency of this forum that people can select any name when posting.
But what is the maturity of someone who fakes the name of someone else? You felt too cornered about the trolling in that response you wrote to Eriks posts?
no, confound it there has been quite a few posts lately where 'ARM' has been used as an identifier for device dependent parameters, it is getting old for every post having to ask "WHAT?" about some missing detail. "0xFFFF0000 (start of ARM local RAM)" is blatantly false. Also, the OPs reaction to this was (horray) to identify what he was using and state the actual problems (that he had managed to work through).
you stoopid n00b I posted no such thing, I even gave an example of what it should be.
That some are so fragile that they can not handle corrections is not my problem.
Per,
I assume that you meant this clinically:
but at least I don't post stupid stuff like Tamir "What potty mouth you have" Michael.
Erik certainly does not need my defense - but the record I stand behind what I said.
Let me try again (it is my trade mark is it not..)
I assume that you meant this cynically:
Erik certainly does not need my defense - but for the record I stand behind what I said.