-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document JLink Debugger Support #291
Comments
Examples/MAX78000/LP/main.c |
Please use P3.0 or reset instead of P3.1. In either case, a reset will be triggered. |
How to use P3.0 because it is a shared signal between PMIC and MAX 78000 IC. |
Unfortunately not, only P3.0 or reset can be used as the wake-up source in Power Down mode. The example and documentation will be updated soon. |
Thank you @aniktash Next question, this may not be related to the actual question While I am testing I found in code path : https://github.com/Analog-Devices-MSDK/msdk/blob/main/Examples/MAX78000/LP/main.c includes paths that are not visible to the Eclipse IDE check my includes, I included almost everything. Still there are some red line missing includes. Did I miss something? |
yes, you are right @aniktash . Still, I can find some includes are missing, Can you tell me what are they? though they are missing, Still the compiler can see them while building and always has 0 errors. |
"Sometimes the indexer needs help; You may need to choose to search for unresolved includes, re-resolve or refresh and rebuild": Wow, That rebuild indexing did the trick. Thank you @aniktash This will be my last question in this post chain,
When debugging I can see by stepping in, But is there a way to know without debugging? |
The peripheral drivers are in this folder: C:\MaximSDK\Libraries\PeriphDrivers\Source |
Thank you @aniktash |
@jessexm could you please support? |
@chaitanya-smartrotamac I have a J-Link setup guide for Visual Studio Code on the VSCode-Maxim wiki here: https://github.com/Analog-Devices-MSDK/VSCode-Maxim/wiki/Segger-J-Link-Setup-Guide There is an option to use either our OpenOCD server or the native JLink GDB server, which is discussed more in the document. The setup guide will be migrated to the official MSDK User Guide soon, so if you encounter any issues or any missing info please let me know. A tip for troubleshooting: If you have issues connecting with a JLink debugger try connecting with our PICO debugger first, and verify that works. If the PICO cannot connect either, then there may be some hardware issues with the custom board. |
@chaitanya-smartrotamac for Eclipse there is some official documentation here: https://eclipse-embed-cdt.github.io/debug/jlink/ I haven't tested this thoroughly myself yet, but for VS Code I found I had to override the JLink Reset strategy to Type 2 (ResetPin) to get the native JLink Server to work reliably. I passed the following command-line option to the JLink server:
Where the contents of the /*********************************************************************
*
* ConfigTargetSettings
*
* Function description
* Called before InitTarget(). Mainly used to set some global DLL variables to customize the
* normal connect procedure. For ARM CoreSight devices this may be specifying the base
* address of some CoreSight components (ETM, …) that cannot be auto-detected by J-Link
* due to erroneous ROM tables etc. May also be used to specify the device name in case
* debugger does not pass it to the DLL.
*
* Notes
* (1) May not, under absolutely NO circumstances, call any API functions that perform target communication.
* (2) Should only set some global DLL variables
*
* Return value
* >= 0 O.K.
* < 0 Error
* -1 Unspecified error
*/
int ConfigTargetSettings(void) {
//
// Set reset strategy used by the J-Link to Reset + Halt After Bootloader Using Watchpoint.
//
JLINK_SYS_Report("-- Configure Reset Strategy --");
JLINK_ExecCommand("SetResetType = 2"); // Use RESETPIN (Resets core & peripherals using RESET pin.) Other reset strategies proved to be unreliable.
return 0;
} |
Hi @Jake-Carter I will try your method in VS code and sure will let you know any issues with it. We tried from our side with eclipse and found a working configuration, Which you can use for testing and add to the official document. Hello world code folder structure I am using That's it, It worked. I think prerequisites are
Please review the settings and suggest any changes required. |
Thanks @chaitanya-smartrotamac, this is great. I'll test it out and get it added to our UG. Much appreciated! |
Hi @Jake-Carter I am trying to setup Visual studio jlink setup and following problems I am facing
This is error :
Loaded project.mk
C:\MaximSDK\Tools\GNUTools\10.3\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the
how to revert back to normal jlink? I added this setting in User settings I clicked on erase and I got this
why is it "TARGET: max32xxx.cpu - Not halted" but I have MAX78000 |
Looks like VS Code changed the name of that option in the latest update, so my screenshot is outdated. You found the correct option - it's Open User Settings (JSON)
You can follow steps 1-3 from https://github.com/Analog-Devices-MSDK/VSCode-Maxim/wiki/Segger-J-Link-Setup-Guide#option-2-j-link-with-jlinkgdbserver to revert the adapter back to the normal JLink drivers
max32xxx is a common CPU configuration across all of our micros, so this is expected. Everything looks correct on your setup. There should be a "flash.log" file in your project with some more detailed OpenOCD output on why the flash failed. Can you attach it? |
Hi @Jake-Carter @aniktash Right now, I want to understand how this works by programming MAX78000 fthr eval kit using another MAX78000 fthr eval kit. |
Now I am using FTHR board,
Red light on > Clicked the trigger button > Red light off > waiting for 3.0/3.1 to be pressed.
I connected the pin 3.1 to the gnd and found nothing is happening ?
It should be supposed to wake up right? not happening. Is something wrong with my expectation?
The text was updated successfully, but these errors were encountered: