Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

StackOverflow Point

StackOverflow Point Navigation

  • Web Stories
  • Badges
  • Tags
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Web Stories
  • Badges
  • Tags
Home/ Questions/Q 186157
Alex Hales
  • 0
Alex HalesTeacher
Asked: June 10, 20222022-06-10T17:57:27+00:00 2022-06-10T17:57:27+00:00

c – Breakpoints are not being hit – CLion Full Remote Debug – MakeFile – GDB

  • 0

[ad_1]

It doesn’t matter what type of remote debug connection I tried.. Full Remote Host, Remote Debug, Remote GDB Server etc.

Actually remote device starts working when I clicked the debug button. I can run it from my CLion but it never hits to my breakpoints..

I’m not professional on remote debugging, actually it is my second work but this time it is on already working ( readymade ) project on my Raspberry pi Lorawan device ( Debian ) .
Device connected to my home network and there is a package forwarder app in it. App listens 1680 port.

Normally it is working on remote device with no problem. I downloaded the app to my computer and built the project successfully in CLion. After I tried lots of things, almost every combination of remote debugging and settings. I understood I’m missing some point and I need help. If you can help me you will save my life

Makefile :

    ### get external defined data

    include ../target.cfg

    ### Application-specific constants

    APP_NAME := lora_pkt_fwd

    ### Environment constants

    LGW_PATH ?= ../libloragw
    LIB_PATH ?= ../libtools
    ARCH ?=
    CROSS_COMPILE ?=

    OBJDIR = obj
    INCLUDES = $(wildcard inc/*.h)

    ### External constant definitions
    # must get library build option to know if mpsse must be linked or not

    include $(LGW_PATH)/library.cfg
    RELEASE_VERSION := `cat ../VERSION`

    ### Constant symbols

    CC := -g $(CROSS_COMPILE)gcc
    AR := $(CROSS_COMPILE)ar

    CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libtools/inc
    VFLAG := -D VERSION_STRING="\"$(RELEASE_VERSION)\""

    ### Constants for Lora concentrator HAL library
    # List the library sub-modules that are used by the application

    LGW_INC =
    ifneq ($(wildcard $(LGW_PATH)/inc/config.h),)
      # only for HAL version 1.3 and beyond
      LGW_INC += $(LGW_PATH)/inc/config.h
    endif
    LGW_INC += $(LGW_PATH)/inc/loragw_hal.h

    ### Linking options

    LIBS := -lloragw -ltinymt32 -lparson -lbase64 -lrt -lpthread -lm -lcursor

    ### General build targets

    all: $(APP_NAME)

    clean:
        rm -f $(OBJDIR)/*.o
        rm -f $(APP_NAME)

    ifneq ($(strip $(TARGET_IP)),)
     ifneq ($(strip $(TARGET_DIR)),)
      ifneq ($(strip $(TARGET_USR)),)
    install:
        @echo "---- Copying packet_forwarder files to $(TARGET_IP):$(TARGET_DIR)"
        @ssh $(TARGET_USR)@$(TARGET_IP) "mkdir -p $(TARGET_DIR)"
        @scp lora_pkt_fwd $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
    install_conf:
        @echo "---- Copying packet_forwarder conf files to $(TARGET_IP):$(TARGET_DIR)"
        @ssh $(TARGET_USR)@$(TARGET_IP) "mkdir -p $(TARGET_DIR)"
        @scp global_conf.json.sx1250.* $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
        @scp global_conf.json.sx1257.* $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
      else
        @echo "ERROR: TARGET_USR is not configured in target.cfg"
      endif
     else
        @echo "ERROR: TARGET_DIR is not configured in target.cfg"
     endif
    else
        @echo "ERROR: TARGET_IP is not configured in target.cfg"
    endif

    ### Sub-modules compilation

    $(OBJDIR):
        mkdir -p $(OBJDIR)

    $(OBJDIR)/%.o: src/%.c $(INCLUDES) | $(OBJDIR)
        $(CC) -c $(CFLAGS) -I$(LGW_PATH)/inc $< -o [email protected]

    ### Main program compilation and assembly

    $(OBJDIR)/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) $(INCLUDES) | $(OBJDIR)
        $(CC) -c $(CFLAGS) $(VFLAG) -I$(LGW_PATH)/inc $< -o [email protected]

    $(APP_NAME): $(OBJDIR)/$(APP_NAME).o $(LGW_PATH)/libloragw.a $(OBJDIR)/jitqueue.o
        $(CC) -L$(LGW_PATH) -L$(LIB_PATH) $< $(OBJDIR)/jitqueue.o -o [email protected] $(LIBS)

    ### EOF

I’m sharing my last try screenshots with you : Full Remot Host.

Breakpoint Error

[ad_2]

  • 0 0 Answers
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Related Questions

  • xcode - Can you build dynamic libraries for iOS and ...

    • 0 Answers
  • bash - How to check if a process id (PID) ...

    • 325 Answers
  • database - Oracle: Changing VARCHAR2 column to CLOB

    • 295 Answers
  • What's the difference between HEAD, working tree and index, in ...

    • 292 Answers
  • Amazon EC2 Free tier - how many instances can I ...

    • 0 Answers

Stats

  • Questions : 43k

Subscribe

Login

Forgot Password?

Footer

Follow

© 2022 Stackoverflow Point. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.