I am working on a ESP32 project that required firmware update, so i am using the following
void update_fwm(void)
{
esp_http_client_config_t config = {
.url = "https://myserver.net/firmware/ESP32/Device1/fmw.bin",
//.cert_pem = (char *)server_cert_pem_start,
};
esp_err_t ret = esp_https_ota(&config);
if (ret == ESP_OK) {
esp_restart();
} else {
return ESP_FAIL;
}
return ESP_OK;
}
When i preform a build i get the followin:
../main/azure_iot_freertos_esp32_main.c:10:10: fatal error: esp_https_ota.h: No such file or directory
#include "esp_https_ota.h"
If I understood it correctly with ESP32 IDF, all libraries are inbuild into the compiler?
Is there reason for this error?
Without further details I assume that there is propably a problem with your toolchain (linking). If the setup is done correctly this esp-lib should be "found".
Please refer to the official Espressif documentation for the correct setup of the toolchain on your system: Espressif Get Started
If used in a (self-written) component, make sure to use REQUIRES <lib> in the CMakeLists-file.
You will need REQUIRES esp_https_ota in CMakeLists.txt if you are also using set(COMPONENTS "main").
Related
This is my first time working with kernel modules at core. I am trying to run a sensor BMC150 for which the kernel already has an IIO-framework driver :
https://elixir.bootlin.com/linux/latest/source/drivers/iio/magnetometer
I can see this :
static const struct of_device_id bmc150_magn_of_match[] = {
{ .compatible = "bosch,bmc150_magn" },
{ .compatible = "bosch,bmc156_magn" },
{ .compatible = "bosch,bmm150_magn" },
{ }
};
So I created my device tree node like this :
magn#13 {
compatible = "bosch,bmc150_magn";
reg = <0x13>;
status = "ok";
};
Now if I have built the module as built-in, I can see the driver under /sys/bus/i2c/drivers and the probe happens and I can see the device under /sys/bus/iio/devices and everything works fine and I am able to get the readings from the sensor.
However, if I would have build the module as 'M' (not built-in), I do not see the module under /sys/bus/i2c/drivers and also no IIO devices get generated. Seems like the kernel does not know about the driver.
What is the problem here ? (I am using busybox rootfs and I used make modules_install to install the modules to the rootfs. If I do "modprobe the driver loads and everything works fine)
i read in this SO post that if a module has other modules yet-to-be loaded as dependencies then these problems may happen. Is this the issue, am not sure. Please guide.
I'm working with golang and used termui library for a purpose. find ref here for the library.
termui.Handle("/timer/1s", func(e termui.Event) {
if true {
if true {
strs = []string{"something"}
} else {
strs = []string{"something else"}
}
ls.Items = strs // ls := termui.NewList()
} else {
strs = []string{"something else"}
ls.Items = strs
}
termui.Render(ls)
})
above code is to suppose write a text on terminal window but nothing is happend. I've not got any ref or solution regarding same.
above code is working on windows but not in ubuntu 18.04.
also
termui.Handle("/sys/kbd/C-c", func(termui.Event) {
termui.StopLoop()
})
above code working on windows but not in ubuntu 18.04.
Please provide a solution or alternatives for above.
thanks in advance.
Here I'm answering my own question. Owner of library change their events and functions. They deprecated /timer/1s and force user to use Gos build in timer.
here is library changes and documentation
Hope to find some guidance on this one soon, I've added reference for Windows IoT UWT in my project but still getting the following error ?
An exception of type 'System.TypeLoadException' occurred in test_led_alljoyn.exe but was not handled in user code
Additional information: Could not find Windows Runtime type 'Windows.Devices.Gpio.GpioController'.
Has anyone come across this issue while compiling applications for Raspberry Pi on Windows IoT core, on it's own one of my sample push button app works fine. Here's my code
public IAsyncOperation<testlightbulbSwitchResult> SwitchAsync(AllJoynMessageInfo info, bool interfaceMemberOn)
{
return (Task.Run(() =>
{
SwitchLED(interfaceMemberOn);
return testlightbulbSwitchResult.CreateSuccessResult();
}).AsAsyncOperation());
}
private void SwitchLED (bool state)
{
_ledState = state;
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Devices.Gpio.GpioController"))
{
this.tController = GpioController.GetDefault();
if (this.tController == null)
{
//GpioStatus.Text = "There is no GPIO controller on this device.";
//return;
this.tPin = this.tController.OpenPin(5);
this.tPin.Write(GpioPinValue.High);
this.tPin.SetDriveMode(GpioPinDriveMode.Output);
}
this.tPin.Write(_ledState ? GpioPinValue.Low : GpioPinValue.High);
}
}
Solved. I had to set build platform target compile with .net native tool chain.
I am using POCO library 1.6.0 on OS X 10.10 and XCode 6.1.1 for building a mac application.
I have compiled it for static linking using the following configuration:
./configure --omit=Data/ODBC,MonoDB,Data/MySQL,Data/SQLite --config=Darwin64-clang-libc++ --static
This results in successful compilation and produces .a files.
I have linked the libraries in XCode under linked frameworks and libraries.
The app runs successfully.
Questions:
However on execution of Poco::Net::HTTPRequest to http://example.org, it fails with error : Net Exception Address family not supported. There is a closed issue here as well: https://github.com/pocoproject/poco/issues/657.
This happens only when the Build Configuration is set to "Debug" and not "Release" which is strange.
Here is the code:
void test(){
Poco::JSON::Object result;
result.set("error", "0");
result.set("errorMessage","");
result.set("response","");
result.set("success", "true");
try {
Poco::URI uri("http://example.org/?time=12345");
Poco::Net::HTTPClientSession session(uri.getHost(), uri.getPort());
Poco::Net::HTTPRequest req(Poco::Net::HTTPRequest::HTTP_GET,uri.getPath(), Poco::Net::HTTPMessage::HTTP_1_1);
req.set("User-Agent","Chrome/3.2");
session.sendRequest(req); // sends request, returns open stream
// Get response
Poco::Net::HTTPResponse res;
std::istream& is = session.receiveResponse(res);
std::string str=std::string((std::istreambuf_iterator<char>(is)),
std::istreambuf_iterator<char>());
std::cout<<str;
} catch (Poco::Exception& e) {
result.set("error", 103);
result.set("errorMessage",e.what()+e.message());
result.set("success", "false");
}
std::ostringstream stream;
result.stringify(stream);
std::string str = stream.str();
std::cout<<""<<str<<"";
}
This is very simple code basically stolen from fixbyproximity
int main (int argc,char *argv[]) {
allegro varibles
ALLEGRO_DISPLAY *display = NULL;
ALLEGRO_EVENT_QUEUE *event_queue = NULL;
ALLEGRO_FONT *font18 = NULL;
ALLEGRO_TIMER *timer;
ALLEGRO_BITMAP *image;
if (!al_init()) { //intialize ALLEGRO
return -1;
}
display = al_create_display(width, height);
if (!display) {
return -1;
}
al_install_mouse();
al_install_keyboard();
al_init_image_addon();
al_init_ttf_addon();
} ;
The error
dyld: lazy symbol binding failed: Symbol not found: _FT_Init_FreeType
Referenced from: /usr/local/lib/liballegro_ttf.5.0.dylib
Expected in: flat namespace
I'm really confused! The headers in the include folder are all there and Xcode does recognize the headers related to Freetype but I still am getting same error.
Is there a binary I'm supposed to link? because I can't find one, only headers =/
I did try to link libfreetype.a but all I got was another error
ignoring file /Users/michealdouble/Desktop/hilow1/libfreetype.a, file was built for archive
which is not the architecture being linked (i386)
You must build FreeType it for 32bit. By default it is build for 64 bits.
Then add libfreetype.a to your project, and it should work.