- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am looking for a way to programmatically determine if the Application is starting on its own or if it gets started with a connected ALTERA USB-Blaster (JTAG). Until now I had two separate Project configurations in the IDE containing the defines _DEBUG and NDEBUG. project details: - Nios2/f - ACDS 13.0sp1 - FreeRTOS Thanks for your suggestions!Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've always used a GPIO with the built-in pull up enabled. It's connected to an external switch that grounded it. Grounded indicating debug mode, open is non-debug mode. The software could read that switch at startup to determine if you were running in debug mode or not.
If this isn't available, you might try a different scheme. I've not used this but it's easy to see if it works or not. Write some characters to the JTAG uart. If the transmit buffer never empties, no JTAG is connected. Don't write more than the FIFO holds or the software will hang waiting for the data to go out (which it never will).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response! I'll try that as soon as possible.
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page