Search found 42 matches

by SJHardy
Wed Apr 03, 2024 5:29 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

While I can't cite chapter and verse of the C standard, I'm pretty sure it should not be making any assumptions about what functions do. If the CL6X compiler is really assuming the value is unchanging through the loop, that's definitely a compiler bug. I seem to recall reading that the compiler must...
by SJHardy
Wed Apr 03, 2024 3:58 am
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

Is thd_function defined to be volatile? No, but I don't think the compiler should be optimizing that out since it doesn't really know what Delay_sec() might do. I probably should declare the "supe" pointer as pointer to volatile, which would remove any question in this and other cases, but at prese...
by SJHardy
Tue Apr 02, 2024 8:01 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

I've finally had a bit of a breakthrough. As described before, my homing procedure runs in thread 2, while the supervisor continues to run housekeeping in thread 7. But in addition, thread 1 is a stub program that launches the homing procedure (by executing thread 2 via the supe->ref_axes() call lis...
by SJHardy
Tue Apr 02, 2024 7:00 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

Hi Tom, What is the resolution of TIMERLL0? I couldn't find doc. for it in the TI literature. Until now, I didn't realize the resolution of Delay_sec() might be in the microsecond or better, but I'm thinking of replacing some ad-hoc delay loops in my code to consistently use the firmware function. I...
by SJHardy
Sat Mar 30, 2024 12:44 am
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

Q: how does one coax CCS into allowing breakpoints to be set by C program/line number? At present I can step through, and it highlights the C source line correctly, but breakpoints can only be set on known symbols, which forces me to create dumb little functions all over the place. If I try to set o...
by SJHardy
Fri Mar 29, 2024 7:15 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

I already have a user callback that is used to get accurate time stamps for certain input bit changes, such as touch probe measurements. I think it's a good idea to add a sanity check in there. The only problem I can see is if IER[6] was turned off, then it would never get inside the user callback s...
by SJHardy
Thu Mar 28, 2024 5:04 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

If only it was so easy as to be some of my code which was looping! The evidence seems to be pointing to a call via a bad function pointer or something similar which starts it executing random data (not code - the disasm knew that the PC was in one of my floating point data tables). I guess the diffe...
by SJHardy
Wed Mar 27, 2024 10:49 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

I think CCS is basically going. For anyone else out there using CCS on Linux (Ubuntu), Version 11 works on Ubuntu 22.04, but fails badly on 16.04. Version 12 doesn't properly install on 16.04 because it requires a slightly up-level libc for a logging utility. Haven't tried CCS 12 on Ubuntu 22.04. I'...
by SJHardy
Mon Mar 25, 2024 5:55 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

Is J6 the JTAG port on the Kogna? The online documentation refers to the Kflop, but the Kflop uses JP2 for JTAG. As the only 14-pin header on the board, I'm guessing it is, but would like confirmation before smoke testing.
by SJHardy
Tue Mar 12, 2024 9:25 pm
Forum: C Programs
Topic: Kogna debug suggestions
Replies: 41
Views: 627

Re: Kogna debug suggestions

I implemented the reset as you described, and it works. I can reset and run diagnostic code after a crash. Unfortunately, I'm no closer to solving this issue. It's like a hand grenade: the pin is pulled in one thread, and some time later everything goes kablooey. No amount of trace and function hook...