VSCode Onethinx Pack PDL Version

Hello,

I’ve noticed that the VSCode Onethinx Pack has PDL version 1.3.1, but Cypress’ latest version is 3.1.2. I know of at least one bug (redefinition of cycfg_ClockStartupError()) that was fixed in later versions, so I would like to update, if possible. However, I have noticed that the directory structures of the two versions are quite different. I’m worried that, if I copy the new PDL into the VSCode Onethinx Pack directory structure, I’ll just create a big mess.

What do you think?

Paul

1 Like

Hi Paul,

I’ve not tried the latest PDL version yet. It might work out of the box by copying over. There’s a function inside cmake which scans the PDL folder for .c files and .h files.

I suggest to backup the current PDL folder and try out the latest PDL.

Inside the pack’s config folder there’s cypress_peripheral_drivers_library.cmake which may need the paths to be adjusted. Also in the project’s CMakeLists.txt you might to adjust the startup file locations (if changed).

1 Like

Thanks, Rolf. I’ll give it a try.

Paul

Well, that was a disaster. Completely different structure and several API functions nonexistent and/or renamed. So, I restored things back to the way they were (PDL 1.3.1.1499).

The reason I tried to upgrade the PDL was because the Device Configurator was generating code that called functions that couldn’t be found, and might not even exist. I suspected that this was a mismatch between the configurator and the PDL. Does anyone know if the configurator references a code/template database, and if so, is there a way to tell what PDL version the database is linked to?

Paul

Another “interesting” observation: when I created a new generic PSoC 6 project in Modus Toolbox 2.1, it put PDL 1.5.2 into the project. But, as far as I can tell, the only PDL versions I have installed are versions 3.0.1 through 3.1.2. Any idea where the PDL 1.5.2 in the project could have come from?

Paul

OK, it appears that the configurator gets code from the various personality files. I also discovered that there is a slight difference between the power-1.2.cypersonality file in PDL 1.3.1 and that in PDL 1.5.2. One would think that the two files should be identical if their version numbers are the same.

When I copied the power-1.2.cypersonality file from PDL 1.5.2 to PDL 1.3.1, a couple of compiler errors went away. From now on, when I get compiler errors on files generated by the configurator, I’ll try comparing personality files.

Paul

Hi Paul,

The 3.x.x PDL versions are for use with PSoC Creator and the 1.x.x are for use with ModusToolbox.

I guess the PDL for Modus is downloaded using the Library Manager from the Github page.

There are personalities for each (underlying) peripheral. The device configurator let’s you choose the version.

It seems each ModusToolbox update is creating it’s own new issues and especially as we’re using the dual-core PSoC6 with locked CM0p, we tend to stick to the older (confirmed working) version.

We fixed the cycfg_ClockStartupError() on our version on Github (still using the PDL_1.3.1.1499).

Personally I completely got rid of the ModusToolbox PDL and I am using PSoC Creator for device configuration. I still love PSoC Creator, the easiness of setting up the peripherals and the IO’s still rules. I’ve added additional UDB blocks (UART, I2C and PWM) to accommodate routing of these peripherals to any IO.

Rolf

1 Like

Hi Rolf,

Thanks for the clarification.

I’ve decided to use PSoC Creator and your porting tool. I am also trying to bring the generated API into my VSCode project. I have run into some issues, but I’ll discuss them in another thread.

Paul