This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using devicetree_legacy_unfixed.h instead of devicetree_unfixed.h

Hi,

I have updated my SDK from v1.2.0 to v1.3.0 and am currently fighting my way through all the compatibility issues that my application is now suffering from.

Is there a way to use the old DTS_ALIAS declarations which are still in the build directory under the file devicetree_legacy_unfixed.h instead of the new version.

I really want to avoid fighting through rewriting all driver code for the PCA10090's LEDs, Buttons, UARTs and NVS, PCA20035's LEDs, Button, SPI, PWM, NVS and a custom PCB's UARTs, I2C, PWM and NVS. This SDK has completely new format of declaring the ports and pins from the device tree files and would leave me spending days fixing and then more days ensuring that everything is working on every platform and configuration that I have in my application in the same way it did in code that I designed and got working over a year ago.

Parents
  • Currently, a huge portion of the support team is on vacation, and you may experience delayed answers.

    I have not been able to look into the issue regarding using the old DTS declarations yet. Did the suggestion from  help you?

    Best regards,

    Simon

  • Yes suggestion has cleared the errors that existed for all peripherals except WDT. The old DT_WDT_NAME was replaced with DT_ALIAS declarations and required updating regardless.

    However, I'm still in the process of fixing the application. Right now I can not open any sockets using

    at_sock = socket(AF_LTE, 0, NPROTO_AT);
    
    if (at_sock < 0) {
    	printk("Socket failed to open\n");
    	pCtrl->System_Health.SysStatus = SYSTEM_ERR_MODEM_ERR | pCtrl->System_Health.SysStatus;
    	state_set(&gCtrl, DEVICE_ERROR);
    	return -1;
    }

  • Figured out the answer to the question myself. Pre-v1.3.0 the socket opening line:

    socket(AF_LTE, 0, NPROTO_AT);

    Worked to open a simple socket for running AT commands to set modem parameters. In v1.3.0 the socket type '0' no longer works and produces an error. To correct this, the socket can be opened with a different type such as:

    socket(AF_LTE, SOCK_DGRAM, NPROTO_AT);

    Thus setting what is an AT protocol socket as a UDP socket type. Why this the way it is done now, I have no clue but this clears the error and allows the socket to be created.

Reply
  • Figured out the answer to the question myself. Pre-v1.3.0 the socket opening line:

    socket(AF_LTE, 0, NPROTO_AT);

    Worked to open a simple socket for running AT commands to set modem parameters. In v1.3.0 the socket type '0' no longer works and produces an error. To correct this, the socket can be opened with a different type such as:

    socket(AF_LTE, SOCK_DGRAM, NPROTO_AT);

    Thus setting what is an AT protocol socket as a UDP socket type. Why this the way it is done now, I have no clue but this clears the error and allows the socket to be created.

Children
No Data
Related