Unable to remove target from internal database
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have created a traget:
testTarget = target.create("Processor", Name="My Processor", Manufacturer="XXX");
languageimplementation = target.create("LanguageImplementation");
languageimplementation.AtomicFloatSize = 64;
languageimplementation.AtomicIntegerSize = 32;
languageimplementation.DataTypes.Char.Size = 8;
languageimplementation.DataTypes.Double.Size = 64;
languageimplementation.DataTypes.Float.Size = 32;
languageimplementation.DataTypes.Half.IsSupported = false;
languageimplementation.DataTypes.Half.Size = 16;
languageimplementation.DataTypes.Int.Size = 32;
languageimplementation.DataTypes.Long.Size = 32;
languageimplementation.DataTypes.LongLong.Size = 64;
languageimplementation.DataTypes.Pointer.Size = 32;
languageimplementation.DataTypes.PtrDiffT.Size = 32;
languageimplementation.DataTypes.Short.Size = 16;
languageimplementation.DataTypes.SizeT.Size = 32;
languageimplementation.Endianess = "Little";
languageimplementation.WordSize = 32;
testTarget.LanguageImplementations(1) = languageimplementation
objs = target.add(testTarget, UserInstall=false); % don't persist yet until we know how to remove it
% remove the target, attempt 1
target.remove(testTarget);
% remove the target, attempt #2
trgt = target.get('Processor', 'XXX-My Processor');
target.remove(trgt);
% remove the target, attempt #3
target.remove(objs);
% remove the target, attempt 4
target.remove('Processor', 'XXX-My Processor', 'IncludeAssociations', true);
All attempts to remove the target from the internal database fail with the same error message:
Error using targetframework.internal.repository.TargetRepository/remove
Object target.LanguageImplementation is invalid. Use target.create to create the object.
Error in target.remove (line 75)
tr.remove(arguments{:}, options);
The message that the "Object target.LanguageImplementation is invalid" is because the valid flag ist set to 1 in the target's LanguageImplementation.
I am also wondering where Matlab stores the targets. I can find targets in "C:\Program Files\MATLAB_R2021b_x64\toolbox\targetframework\data\model\data.xml". But the targets created by the user don't seem to appear there, even when 'UserInstall' is set to true when adding the target with target.add().
Best Regards,
Juergen
0 Commenti
Risposte (2)
Meg Noah
il 6 Ago 2025 alle 21:52
testTarget = target.create("Processor", Name="My Processor", Manufacturer="XXX");
languageimplementation = target.create('LanguageImplementation', ...
'Name', 'Armv8-A LP64', ...
'Copy', 'ARM Compatible-ARM Cortex');
languageimplementation.AtomicFloatSize = 64;
languageimplementation.AtomicIntegerSize = 32;
languageimplementation.DataTypes.Char.Size = 8;
languageimplementation.DataTypes.Double.Size = 64;
languageimplementation.DataTypes.Float.Size = 32;
languageimplementation.DataTypes.Half.IsSupported = false;
languageimplementation.DataTypes.Half.Size = 16;
languageimplementation.DataTypes.Int.Size = 32;
languageimplementation.DataTypes.Long.Size = 32;
languageimplementation.DataTypes.LongLong.Size = 64;
languageimplementation.DataTypes.Pointer.Size = 32;
languageimplementation.DataTypes.PtrDiffT.Size = 32;
languageimplementation.DataTypes.Short.Size = 16;
languageimplementation.DataTypes.SizeT.Size = 32;
languageimplementation.Endianess = "Little";
languageimplementation.WordSize = 32;
testTarget.LanguageImplementations = languageimplementation;
target.add(testTarget)
% remove the target, attempt 1
target.remove(testTarget);
0 Commenti
Jürgen
il 7 Ago 2025 alle 6:10
1 Commento
Meg Noah
il 7 Ago 2025 alle 19:57
Modificato: Meg Noah
il 7 Ago 2025 alle 20:00
Hi Jurgen,
I just used the online version here in the comment section. Copy and paste the code into a CODE block and click the RUN (green triangle button) here in a comment. Try this one:
testTarget = target.create("Processor", Name="My Processor", Manufacturer="XXX");
languageimplementation = target.create('LanguageImplementation', ...
'Name', 'MyProcessorImplementation');
languageimplementation.AtomicFloatSize = 64;
languageimplementation.AtomicIntegerSize = 32;
languageimplementation.DataTypes.Char.Size = 8;
languageimplementation.DataTypes.Double.Size = 64;
languageimplementation.DataTypes.Float.Size = 32;
languageimplementation.DataTypes.Half.IsSupported = false;
languageimplementation.DataTypes.Half.Size = 16;
languageimplementation.DataTypes.Int.Size = 32;
languageimplementation.DataTypes.Long.Size = 32;
languageimplementation.DataTypes.LongLong.Size = 64;
languageimplementation.DataTypes.Pointer.Size = 32;
languageimplementation.DataTypes.PtrDiffT.Size = 32;
languageimplementation.DataTypes.Short.Size = 16;
languageimplementation.DataTypes.SizeT.Size = 32;
languageimplementation.Endianess = "Little";
languageimplementation.WordSize = 32;
testTarget.LanguageImplementations = languageimplementation;
target.add(testTarget)
% remove the target, attempt 1
target.remove(testTarget);
Vedere anche
Categorie
Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!