Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Debug C++ with metadata of microSD en real time?

Debug C++ with metadata of microSD en real time?

Josaphat_Aviles
Established Member

Does anyone know what is the correct way to debug C++ to work with the micro SD metadata found in the ctrlx core? In theory I can use "Debugging in Build Environment + Connection to Data Layer via TCP".... however for obvious reasons I get error when I try to program based on the SD memory metadata, since it is an environment and I am not programming directly in the ctrlx, I get error, does anyone know if there is a way to do it?

7 REPLIES 7

CodeShepherd
Community Moderator
Community Moderator

Moved to corresponding sub forum SDK.

Do I get it right, that you like to do tests inside of your build environment and have some SD-card available there? as this is not possible as far as I know.

What is possible, is that an app running in your build environment is communication via TCP to a ctrlX OS in a real ctrlX CORE or a virtual one. In this case only TCP communication is available.

Third option is to build the app and install it in a ctrlX OS and e.g. use debug messages or an ssh connection to get more information. See also "How to activate SSH communication in a ctrlX CORE"

nickH
Community Moderator
Community Moderator

What do you want to access on your SD-Card? This I don't get from your question. But anyway here Is how you could solve this: 

  1. You could still use the Debugging in App Build Environment (option 2) but then you modify your code so it will access for the debugging not a path on the SD-Card but inside your App Build Environment. Then you need to mock the directories which you normally have on your SD-Card in some directory inside your App Build Environment. 
  2. If you want to Debug on the real target, you can use the option 1 (snap logs) or option 3 (remote debugging). Please see the manual for this: Debugging Overview

Btw: What does it have to do with Real Time?

Best regards, 

Nick

 

Main goal:
Create an application to detect micro sd, its name, its free capacity, its total capacity.
With all this information in C++ and data that I already get from a cRIO create conditions in my code and then save them in this same micro SD(It requires know the path file of microSD in Ctrlx).
In case my sd memory is about to fill up, I stop saving information to avoid ctrlx collapse.

Sgilk
Frequent Contributor

Hi @Josaphat_Aviles ,

If I understand correctly, you shouldn't need any hard real-time capability for this application.

I agree with @nickH in terms of debug methods. Additionally, you could try and pass a microSD into your app build environment so you are working with the real device rather than an emulation. This would be my ideal setup for development/debug. See this post on a similar topic.

Hello @nickH,

I create an app to receiving data millions of data peer second, however after minutes, collapse the Ctrlx core. So the solution that we are thinking is plug in a SD Card and program in our C++ code that storage in that SD, nevertheless I need the name of SD to save the csv files and know the path file to do that, and also I need create a cycle where I can detect when the SD is almost full to stop to receiving data.
Currently I am Debugging in App Build Environment and then build snap to download and upload manually in the ctrlx core.
I already try with C++ code to find metadata but it looks that CtrlX is blocked or doesnt have perssions to know that, thats why I need your support.
Thanks in advance

Sgilk
Frequent Contributor

Hi @Josaphat_Aviles ,

I have a couple questions that will help to give you some support.

  1. What microSD metadata are you trying to find? (It sounds like the name, path and memory used/remaining?)
    1. Have you tried similar methods to this post?
  2. What problems are you experiencing that make you think ctrlX doesn't have permission?

Hello @Sgilk ,

It run in the ctrlx, but receive incorrect information, and there is no possibility to automate sd storage just with plug and play, because it require name of the SD. We continue work with API rest.
thank you

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist